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.