Miniplayer can now restart video if autoplay is not set.

This commit is contained in:
GilesMunn 2022-11-12 16:45:52 +00:00
parent 88c72a45f7
commit cf8288b538

View File

@ -306,6 +306,10 @@ class PlayerFragment : BaseFragment(), OnlinePlayerOptions {
if (!exoPlayer.isPlaying) {
// start or go on playing
binding.playImageView.setImageResource(R.drawable.ic_pause)
if (exoPlayer.playbackState == Player.STATE_ENDED) {
// restart video if finished
exoPlayer.seekTo(0);
}
exoPlayer.play()
} else {
// pause the video