大佬教程收集整理的这篇文章主要介绍了ios – 如何在AVPlayerViewController中禁用音频和字幕设置,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
玩家的控制器初始化:@H_674_7@
- (void) configureMoviePlayer { if(self.moviePlayerController == nil) { self.moviePlayerController = [[AVPlayerViewController alloc] init]; [self.view setTranslatesAutoresizingMaskIntoConsTraints:NO]; [self.moviePlayerController.view setTranslatesAutoresizingMaskIntoConsTraints:NO]; [self.view addSubview: [self.moviePlayerController view]]; NSDictionary *views = @{ @"selfview" : self.view,@"movieControllerView" : [self moviePlayerController].view}; [self.view addConsTraints:[NSLayoutConsTraint consTraintsWithVisualFormat:@"V:|[movieControllerView]|" options:0 metrics:nil views:views]]; [self.view addConsTraints:[NSLayoutConsTraint consTraintsWithVisualFormat:@"H:|[movieControllerView]|" options:0 metrics:nil views:views]]; } }
收到流URL后,它将传递给新的播放器实例:@H_674_7@
self.moviePlayerController.player = [AVPlayer playerWithURL:self.contentUrl]; //self.moviePlayerController.showsPlayBACkControls = YES; if([self.moviePlayerController respondsToSELEctor:@SELEctor(allowsPictureInPictureplayBACk)]) { self.moviePlayerController.allowsPictureInPictureplayBACk = YES; }
示例in the WWDC video不包含按钮.有没有办法只禁用单个按钮,或获取默认工具栏按钮的数组并禁用特定的按钮.@H_674_7@
您需要明确声明内容不包含隐藏式字幕(CLOSED-CAPTIONS = NONE,上面注释中的完整详细信息)@H_674_7@
以上是大佬教程为你收集整理的ios – 如何在AVPlayerViewController中禁用音频和字幕设置全部内容,希望文章能够帮你解决ios – 如何在AVPlayerViewController中禁用音频和字幕设置所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。