Skip to content
Snippets Groups Projects
Commit c4d0b473 authored by Oliver Wiese's avatar Oliver Wiese
Browse files

Merge branch 'master' into mailcoreUpdate

parents 3b13f52c df0df7a7
No related branches found
No related tags found
No related merge requests found
...@@ -320,6 +320,13 @@ NSString * const kOnboardInputViewAccessibilityIdentifier = @"OnboardInputViewAc ...@@ -320,6 +320,13 @@ NSString * const kOnboardInputViewAccessibilityIdentifier = @"OnboardInputViewAc
self.moviePlayerController = [AVPlayerViewController new]; self.moviePlayerController = [AVPlayerViewController new];
self.moviePlayerController.player = self.player; self.moviePlayerController.player = self.player;
self.moviePlayerController.showsPlaybackControls = NO; self.moviePlayerController.showsPlaybackControls = NO;
self.moviePlayerController.player.actionAtItemEnd = AVPlayerActionAtItemEndNone;
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(playerItemDidReachEnd:)
name:AVPlayerItemDidPlayToEndTimeNotification
object:[self.moviePlayerController.player currentItem]];
[self.view addSubview:self.moviePlayerController.view]; [self.view addSubview:self.moviePlayerController.view];
} }
...@@ -422,7 +429,7 @@ NSString * const kOnboardInputViewAccessibilityIdentifier = @"OnboardInputViewAc ...@@ -422,7 +429,7 @@ NSString * const kOnboardInputViewAccessibilityIdentifier = @"OnboardInputViewAc
if (!self.onlyInputView) { if (!self.onlyInputView) {
if (self.videoURL) { if (self.videoURL) {
self.moviePlayerController.view.frame = self.view.frame; self.moviePlayerController.view.frame = self.inputView.frame;//self.view.frame;
} }
CGFloat viewWidth = CGRectGetWidth(self.view.frame); CGFloat viewWidth = CGRectGetWidth(self.view.frame);
...@@ -498,4 +505,9 @@ NSString * const kOnboardInputViewAccessibilityIdentifier = @"OnboardInputViewAc ...@@ -498,4 +505,9 @@ NSString * const kOnboardInputViewAccessibilityIdentifier = @"OnboardInputViewAc
} }
} }
- (void)playerItemDidReachEnd:(NSNotification *)notification {
AVPlayerItem *p = [notification object];
[p seekToTime:kCMTimeZero];
}
@end @end
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment