mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 14:20:30 +05:30
Miniplayer can now restart video if autoplay is not set.
This commit is contained in:
parent
88c72a45f7
commit
cf8288b538
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user