Suggestions.
uzaysan opened this issue · 4 comments
I have tried your library and it works great
and do what it promises. But I have some suggestions.
1- in built cache support( we have already talked about this).
2- in built thumbnail. - we can set an imageview to masterExoPlayer and can use that image view as thumbnail but it can be easier. MasterExoPlayer can have its own thumbnail imageview instead of separate one. And we can use it like this
Glide.with(this).load(thumbnailUrl).into(holder.masterExoPlayer.thumbnailImageView);
3- thumbnails shouldn't disappear when player shown. - as long as player starts playing thumbnail disappear but until video loading finishes we just stare at black screen. Thumbnail should stay until video actually starts playing. Yes we have an option to how many seconds to delay thumbnail before disappear. But I think that's not enough. We cannot measure how many seconds more thumbnail should be visible. That time can change depends on connection speed.
4- Paused video should start from where it lefts when connected activity starts. - player stop video when connected activity is Paused that's works great but video doesn't start when activity's OnResume. And if player controllers is hidden there is no way to start that video unless you scroll down then scroll back to that video.
5- there is no way to unmute video if we started videos muted. - Video controllers also don't have an option to unmute video. Tap to unmute option like Instagram would be great.
6- loading indicator - there should be a loading bar or something similar to show user that object is video and it loading
Like I said in title this things are just suggestions. Your library works great. I'm glad to see that you are working on this library.
Thanks for using library, and making our community great.
- I will work on it. thanks for suggestion.
- In built thumbnail - with current implementation user have full control to use any image loading library, Image View properties etc.
- It is implemented in SNAPSHOT Version you can use.
implementation 'com.github.pankaj89:MasterExoPlayer:master-SNAPSHOT' - Thanks for suggestion, i will add it.
- Yes it is there in library. you can use.
MasterExoPlayer.isMute = true | false
inside adapter - With SNAPSHOT Version there is listener with MasterExoPlayer
binding.frame.listener = object : ExoPlayerHelper.Listener {
override fun onBuffering(isBuffering: Boolean) {
super.onBuffering(isBuffering)
}
}
There are other methods also which you can use depending on your business logic.
SNAPSHOT Version
implementation 'com.github.pankaj89:MasterExoPlayer:master-SNAPSHOT'
Thank you. I will try snapshot version.
Use SNAPSHOT VERSION as
implementation 'com.github.pankaj89:MasterExoPlayer:-SNAPSHOT'
3, 4, 5, 6 are done.
New version released
implementation 'com.github.pankaj89:MasterExoPlayer:1.4.3'