mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-02-04 20:47:39 +01:00
Bugfix: Videoplayer crashed when screen was turned off
This commit is contained in:
parent
add5ce69d3
commit
0e7b1a9f39
@ -39,13 +39,24 @@ public class VideoplayerActivity extends MediaplayerActivity implements
|
|||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
if (videoControlsToggler != null) {
|
||||||
|
videoControlsToggler.cancel(true);
|
||||||
|
}
|
||||||
|
if (PlaybackService.isRunning && playbackService != null
|
||||||
|
&& PlaybackService.isPlayingVideo()) {
|
||||||
|
playbackService.pause(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onStop() {
|
||||||
|
super.onStop();
|
||||||
if (PlaybackService.isRunning && playbackService != null
|
if (PlaybackService.isRunning && playbackService != null
|
||||||
&& PlaybackService.isPlayingVideo()) {
|
&& PlaybackService.isPlayingVideo()) {
|
||||||
playbackService.stop();
|
playbackService.stop();
|
||||||
}
|
}
|
||||||
if (videoControlsToggler != null) {
|
|
||||||
videoControlsToggler.cancel(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user