Commit 7bea7864 authored by Felix Paul Kühne's avatar Felix Paul Kühne

playback: correctly continue video playback when coming back from the background

parent 9482d339
......@@ -1038,7 +1038,15 @@ static inline NSArray * RemoteCommandCenterCommandsToHandle(MPRemoteCommandCente
- (void)applicationDidBecomeActive:(NSNotification *)notification
{
_mediaPlayer.currentVideoTrackIndex = 1;
if (_videoOutputViewWrapper)
[self setVideoOutputView:_videoOutputViewWrapper];
if (_mediaPlayer.numberOfVideoTracks > 0) {
/* re-enable video decoding and reset position once done */
float position = _mediaPlayer.position;
_mediaPlayer.currentVideoTrackIndex = 1;
_mediaPlayer.position = position;
}
if (_shouldResumePlaying) {
_shouldResumePlaying = NO;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment