Skip to content
Snippets Groups Projects
Commit adfef784 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Fix logic fail & no need to unset video track

parent 74e7f6b2
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment