I am trying to show a youtube video but sometimes the YTPlayerView is being displayed in full screen and sometimes not. I want it to be always in full screen. How can I achieve it?
ytView = [[YTPlayerView alloc] initWithFrame:self.view.bounds];
ytView.backgroundColor = self.view.backgroundColor;
ytView.delegate = self;
NSDictionary *playvarsDic = @{ @"controls" : @1, @"playsinline" : @0, @"autohide" : @1, @"showinfo" : @1, @"autoplay": @1, @"modestbranding" : @1 };
[ytView loadWithVideoId:firstImage.Source playerVars: playvarsDic];
Manually set
playerView.webView.allowsInlineMediaPlayback = falseinplayerViewDidBecomeReadyto force the player to go into webview.