Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
观看直播时,字幕菜单选项仍然存在于视频视图中。如何隐藏完整的字幕组?如果显示应该由m3u8管理,那么m3u8怎么看起来字幕菜单消失了?
字幕嵌入到 HLS 流中。AVPlayerViewController 定义了一个名为的属性,该属性allowedSubtitleOptionLanguages允许限制字幕支持的允许语言集。
allowedSubtitleOptionLanguages
为了完全禁用字幕选项卡,您可以为该属性分配一个允许的语言的空列表:
playerViewController?.allowedSubtitleOptionLanguages = [""]