Commit adfef784 authored by Geoffrey Métais's avatar Geoffrey Métais

Fix logic fail & no need to unset video track

parent 74e7f6b2
......@@ -43,7 +43,7 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
}
fun pause(): Boolean {
if (!mediaplayer.hasMedia() && !pausable) return false
if (!mediaplayer.hasMedia() || !pausable) return false
mediaplayer.pause()
return true
}
......@@ -155,7 +155,6 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
fun release(player: MediaPlayer = mediaplayer) {
player.setEventListener(null)
player.setVideoTrackEnabled(false)
if (isVideoPlaying()) player.vlcVout.detachViews()
launch(playerContext) { player.release() }
playbackState = PlaybackStateCompat.STATE_STOPPED
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment