|
|
@ -1238,10 +1238,6 @@ typedef enum : NSUInteger {
|
|
|
|
_videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:attStream.mediaURL];
|
|
|
|
_videoPlayer = [[MPMoviePlayerController alloc] initWithContentURL:attStream.mediaURL];
|
|
|
|
[_videoPlayer prepareToPlay];
|
|
|
|
[_videoPlayer prepareToPlay];
|
|
|
|
|
|
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
|
|
|
|
selector:@selector(moviePlayBackDidFinish:)
|
|
|
|
|
|
|
|
name:MPMoviePlayerPlaybackDidFinishNotification
|
|
|
|
|
|
|
|
object:_videoPlayer];
|
|
|
|
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
|
|
selector:@selector(moviePlayerWillExitFullscreen:)
|
|
|
|
selector:@selector(moviePlayerWillExitFullscreen:)
|
|
|
|
name:MPMoviePlayerWillExitFullscreenNotification
|
|
|
|
name:MPMoviePlayerWillExitFullscreenNotification
|
|
|
@ -1389,16 +1385,18 @@ typedef enum : NSUInteger {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
- (void)moviePlayBackDidFinish:(id)sender {
|
|
|
|
// There's more than one way to exit the fullscreen video playback.
|
|
|
|
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__);
|
|
|
|
// There's a done button, a "toggle fullscreen" button and I think
|
|
|
|
}
|
|
|
|
// there's some gestures too. These fire slightly different notifications.
|
|
|
|
|
|
|
|
// We want to hide & clean up the video player immediately in all of
|
|
|
|
|
|
|
|
// these cases.
|
|
|
|
- (void)moviePlayerWillExitFullscreen:(id)sender {
|
|
|
|
- (void)moviePlayerWillExitFullscreen:(id)sender {
|
|
|
|
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__);
|
|
|
|
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__);
|
|
|
|
|
|
|
|
|
|
|
|
[self clearVideoPlayer];
|
|
|
|
[self clearVideoPlayer];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// See comment on moviePlayerWillExitFullscreen:
|
|
|
|
- (void)moviePlayerDidExitFullscreen:(id)sender {
|
|
|
|
- (void)moviePlayerDidExitFullscreen:(id)sender {
|
|
|
|
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__);
|
|
|
|
DDLogDebug(@"%@ %s", self.tag, __PRETTY_FUNCTION__);
|
|
|
|
|
|
|
|
|
|
|
|