Commit 9cf743cc authored by Geoffrey Métais's avatar Geoffrey Métais

Pause only if playing

parent 3ac56003
......@@ -43,9 +43,11 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
}
fun pause(): Boolean {
if (!mediaplayer.hasMedia() || !pausable) return false
mediaplayer.pause()
return true
if (isPlaying() && mediaplayer.hasMedia() && pausable) {
mediaplayer.pause()
return true
}
return false
}
fun stop() {
......
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