Skip to content

Commit 9cc3bd3

Browse files
committed
refactor/fix: make exiting the player smoother
thanks @Secozzi
1 parent 09d3282 commit 9cc3bd3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

app/src/main/java/live/mehiz/mpvkt/ui/player/PlayerActivity.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ class PlayerActivity : AppCompatActivity() {
142142
}
143143

144144
player.isExiting = true
145+
if (isFinishing) {
146+
MPVLib.command(arrayOf("stop"))
147+
}
145148
MPVLib.removeObserver(playerObserver)
146149
MPVLib.destroy()
147150

0 commit comments

Comments
 (0)