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
|
||||
// and user is watching video in popup player.
|
||||
// Same actions for video player will be handled in ACTION_VIDEO_FRAGMENT_RESUMED
|
||||
if (backgroundPlaybackEnabled()
|
||||
&& popupPlayerSelected()
|
||||
&& (isPlaying() || isLoading())) {
|
||||
if (popupPlayerSelected() && (isPlaying() || isLoading())) {
|
||||
useVideoSource(true);
|
||||
}
|
||||
break;
|
||||
case Intent.ACTION_SCREEN_OFF:
|
||||
shouldUpdateOnProgress = false;
|
||||
// Interrupt playback only when screen turns off with popup player working
|
||||
if (backgroundPlaybackEnabled()
|
||||
&& popupPlayerSelected()
|
||||
&& (isPlaying() || isLoading())) {
|
||||
if (popupPlayerSelected() && (isPlaying() || isLoading())) {
|
||||
useVideoSource(false);
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue