在我的应用程序中,我使用YTPlayerView
来显示 youtube 视频。我已经设置了播放器的参数,以便全屏显示视频。现在我有一个新的测试设备(带有 iOS 12.1 的 iPhone XR),视频通常不会全屏显示。我测试了其他参数,没有任何其他结果。在其他 iOS 12.1 设备或较旧的 iOS 版本上,视频可以正确全屏显示。
self.playerView = [[YTPlayerView alloc] initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, self.view.frame.size.width, f_frameHeight)];
self.playerView.delegate = self;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(exitedFullScreen:) name:UIWindowDidBecomeHiddenNotification object:nil];
NSDictionary *playerVars = @{
@"playsinline" : @0,
@"autoplay" : @1,
@"rel" : @0,
@"showinfo" : @0,
};
[self.playerView loadWithVideoId:ns_videoID playerVars:playerVars];
[self.view addSubview:self.playerView];
有没有人有同样的问题或想法可能是什么问题?