我正在尝试显示youtube视频,但有时YTPlayerView以全屏显示,有时却没有。我希望它始终处于全屏状态。我该如何实现?

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];

最佳答案

playerView.webView.allowsInlineMediaPlayback = false中手动设置playerViewDidBecomeReady以强制播放器进入Web视图。

关于ios - YTPlayerView并不总是全屏显示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/54649984/

10-11 07:53