mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Resume on video end now restarts the video.
This commit is contained in:
parent
84c6c42349
commit
48cf03f78b
1 changed files with 6 additions and 0 deletions
|
@ -180,6 +180,8 @@ class PlayerActivity : AppCompatActivity() {
|
|||
} else {
|
||||
state = 2
|
||||
}
|
||||
} else if (_exoPlayer.playbackState == ExoPlayer.STATE_ENDED) {
|
||||
state = 2
|
||||
} else {
|
||||
state = 0
|
||||
}
|
||||
|
@ -447,6 +449,10 @@ class PlayerActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
fun resume() {
|
||||
if (_exoPlayer.playbackState == ExoPlayer.STATE_ENDED && _exoPlayer.duration - _exoPlayer.currentPosition < 1000) {
|
||||
_exoPlayer.seekTo(0)
|
||||
}
|
||||
|
||||
_exoPlayer.play()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue