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

PlayerController: prevent IllegalStateException

(cherry picked from commit 5245d311)
parent 90c3f406
No related branches found
No related tags found
No related merge requests found
Pipeline #5295 passed with stage
in 3 minutes and 47 seconds
......@@ -226,6 +226,7 @@ class PlayerController(val context: Context) : IVLCVout.Callback, MediaPlayer.Ev
fun getLength() = progress.value?.length ?: 0L
fun setRate(rate: Float, save: Boolean) {
if (mediaplayer.isReleased) return
mediaplayer.rate = rate
if (save && settings.getBoolean(PreferencesActivity.KEY_PLAYBACK_SPEED_PERSIST, false))
settings.edit().putFloat(PreferencesActivity.KEY_PLAYBACK_RATE, rate).apply()
......
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