diff --git a/dailymotion-player-objc/DMPlayerViewController.m b/dailymotion-player-objc/DMPlayerViewController.m index 6fe6abb..67b31a9 100644 --- a/dailymotion-player-objc/DMPlayerViewController.m +++ b/dailymotion-player-objc/DMPlayerViewController.m @@ -105,6 +105,10 @@ - (void)initPlayerWithVideo:(NSString *)video { webview.allowsInlineMediaPlayback = YES; } + if ([self.params[@"fullscreen-state"] isEqualToString:@"fullscreen"]) { + _fullscreen = YES; + } + // Autoresize by default webview.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; diff --git a/test-project/PlaybackViewController.m b/test-project/PlaybackViewController.m index 173d72b..ffb63f3 100644 --- a/test-project/PlaybackViewController.m +++ b/test-project/PlaybackViewController.m @@ -33,6 +33,10 @@ - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { [playerViewController loadVideo:self.videoID withParams:self.additionalParameters]; self.initialPlayerSize = self.playerSize; + // Starting in fullscreen? + if ([self.additionalParameters[@"fullscreen-state"] isEqualToString:@"fullscreen"]) { + self.playerSize = self.view.frame.size; + } self.playerWidthLayoutConstraint.constant = self.playerSize.width; self.playerHeightLayoutConstraint.constant = self.playerSize.height;