2

I want to play video via Glide by load image from URL to image view. , I try to refresh the image by calling to the same URL with the following code:

Glide.with(context)
     .load(imageUrl)
     .apply(RequestOptions.skipMemoryCacheOf(true))
     .apply(RequestOptions.diskCacheStrategyOf(DiskCacheStrategy.NONE))
     .into(imageView);

How to do it in loop??? always I get an exceptions

Moti
  • 462
  • 2
  • 6
  • 18

7 Answers7

6

The question Link on Github:

I quoted a comment done by Member developer of Glide @sjudd:

That's correct, we do not support playing videos. Unfortunately playing videos on Android is enormously complex and must remain out of scope for Glide.

I guess what it can do is playing thumbnail that you should have been created already on your server as GIF. so you send the link to that GIF and Glide will play it. It wont play video.

MBH
  • 16,271
  • 19
  • 99
  • 149
1

No, it can only play GIFs, and show video thumbs. please check this for more support

mitesh makwana
  • 269
  • 3
  • 11
0

As far as I know Glide is for images (including anim GIF), but doesn't support playing videos. You can get thumbs, but no more.

SergeyBukarev
  • 1,478
  • 1
  • 12
  • 19
0

Glide is a library for showing and caching images in android and it's not usable for videos.

Matin Gdz
  • 217
  • 2
  • 13
0

You cannot do this with Glide. I would recommend to Read documentation of android MediaProjection library Api.

0

Play WebP Video On Glide

Transformation<Bitmap> circleCrop = new FitCenter();
            Glide.with(mContext)
                    .load(videoModel.getSmallThumb())
                    .optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(circleCrop))

                    .into(myViewHolder.ivThumb);



implementation 'com.github.zjupure:webpdecoder:2.0.4.13.1'
Vishal Bhut
  • 102
  • 1
  • 11
0

I would recommend using VideoView, it has setVideoURI() method

Victoria Klimova
  • 2,795
  • 1
  • 11
  • 12