Skip to content

Commit

Permalink
fix - pause streaming playback when activity is paused
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmedack committed Dec 27, 2017
1 parent 76500cb commit 9147b89
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ExoPlayerFragment : VideoSupportFragment() {
}

override fun onPause() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && activity.isInPictureInPictureMode) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N || !activity.isInPictureInPictureMode) {
mediaPlayerGlue.pause()
}
super.onPause()
Expand Down

0 comments on commit 9147b89

Please sign in to comment.