0

I'm currently working on a project where I get the following object:

data class VideosDetails(val id: String,
                         val title: String,
                         val thumbSmall: String,
                         val thumbPreview: String,
                         val duration: String)

I receive it in a form of a list, that I pass to my RecyclerView. To display my thumbSmall which is an image I use Glide and it's working well. I'd like to make a video preview using the thumbPreview which is a mp4 so I can't use Glide for this.

I've read that post but it no longer works as createVideoThumbnail is deprecated. The doc says to use ContentResolver.loadThumbnail(Uri, Size, CancellationSignal) but I can't use it because the object Size is 21+ and my min Sdk is 19.

Should I just use MediaPlayer or Exoplayer to do this ? My concern about using this method is that since it'll be in a RecyclerView it'll take a lot of resources. Any advice are welcome.

Biscuit
  • 4,840
  • 4
  • 26
  • 54

1 Answers1

0

In the end I made a custom recyclerview that use one Exoplayer across its items and moves it along which item is clicked.

I made a repo if anyone wants to see how I did it, so here is the repo or here for the custom recyclerview

Biscuit
  • 4,840
  • 4
  • 26
  • 54