Skip to content

Commit

Permalink
pause audio/video when swiping away
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
  • Loading branch information
tobiasKaminsky authored and alperozturk96 committed Sep 11, 2024
1 parent a2eba07 commit de890a8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,13 @@ class PreviewMediaFragment : FileFragment(), OnTouchListener, Injectable {
super.onDetach()
}

override fun onPause() {
mediaPlayerServiceConnection?.pause()
exoPlayer?.pause()

super.onPause()
}

companion object {
private val TAG: String = PreviewMediaFragment::class.java.simpleName

Expand Down

0 comments on commit de890a8

Please sign in to comment.