Enable/disable video after screen on/off regardless of background playback setting
This commit is contained in:
parent
92e13dafe5
commit
886a949a00
|
@ -1290,18 +1290,14 @@ public class VideoPlayerImpl extends VideoPlayer
|
||||||
// Interrupt playback only when screen turns on
|
// Interrupt playback only when screen turns on
|
||||||
// and user is watching video in popup player.
|
// and user is watching video in popup player.
|
||||||
// Same actions for video player will be handled in ACTION_VIDEO_FRAGMENT_RESUMED
|
// Same actions for video player will be handled in ACTION_VIDEO_FRAGMENT_RESUMED
|
||||||
if (backgroundPlaybackEnabled()
|
if (popupPlayerSelected() && (isPlaying() || isLoading())) {
|
||||||
&& popupPlayerSelected()
|
|
||||||
&& (isPlaying() || isLoading())) {
|
|
||||||
useVideoSource(true);
|
useVideoSource(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Intent.ACTION_SCREEN_OFF:
|
case Intent.ACTION_SCREEN_OFF:
|
||||||
shouldUpdateOnProgress = false;
|
shouldUpdateOnProgress = false;
|
||||||
// Interrupt playback only when screen turns off with popup player working
|
// Interrupt playback only when screen turns off with popup player working
|
||||||
if (backgroundPlaybackEnabled()
|
if (popupPlayerSelected() && (isPlaying() || isLoading())) {
|
||||||
&& popupPlayerSelected()
|
|
||||||
&& (isPlaying() || isLoading())) {
|
|
||||||
useVideoSource(false);
|
useVideoSource(false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue