Commit 6d16423c authored by Geoffrey Métais's avatar Geoffrey Métais

Player controller: check player is not released

parent 46155805
......@@ -272,7 +272,7 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
fun getVolume() = if (mediaplayer.hasMedia()) mediaplayer.volume else 100
fun setVolume(volume: Int) = mediaplayer.setVolume(volume)
fun setVolume(volume: Int) = if (!mediaplayer.isReleased) mediaplayer.setVolume(volume) else -1
suspend fun expand(): MediaList? {
return mediaplayer.media?.let {
......
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