gpt4 book ai didi

ios - MPMoviePlayerViewController 移除 "Audio and Subtitles"控制

转载 作者:行者123 更新时间:2023-12-01 20:10:02 25 4
gpt4 key购买 nike

我正在使用 MPMoviePlayerViewController 播放直播视频我想禁用“音频和字幕”的右下角按钮。我找到的唯一解决方案是设置 moviePlayer.controlStyle属性(property)给 MPMovieControlStyleNone ,但这隐藏了所有控件。

有什么方法可以自定义MPMoviePlayerViewController隐藏字幕按钮?

最佳答案

这是按钮存在的原因以及隐藏它的方法:

Video Player unexpectedly shows Alternate Track button for Subtitles and Captions

The source material will have to include: CLOSED-CAPTIONS=NONE on the EXT-X-STREAM-INF tag to remove the Button.



编辑:

我一直在搜索“如何为 URL 插入 HTTP header ”,并发现了一些有趣的结果。首先,如果您真的想将 HTTP header 插入到您的 URL,以下可能会完成这项工作:
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url];
[request setValue:@"NONE" forHTTPHeaderField:@"CLOSED-CAPTIONS"];

如果这不是您要寻找的,解决方案 suggested here可以完成这项工作:

I think setting a cookie might solve your problem. Please look into the documentation for NSHTTPCookie and NSHTTPCookieStorage.



如果还是不行,看看 this related question .

最后,如果所有这些步骤都没有帮助,请实现您自己的控制栏 thanks to this tutorial .

关于ios - MPMoviePlayerViewController 移除 "Audio and Subtitles"控制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37926643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com