如果子视图(非本机、自定义播放器控件)出现在视频显示的系统标题上方,是否可以更改视频显示的系统标题?显示的字幕是文本 WebVTT 字幕。
在某些屏幕尺寸上,当我切换到横向时,我们的自定义搜索栏控件会重叠显示在播放器底部的字幕。
对于它的价值来说,这is可能的。您需要访问 AVPlayer 的当前项目并为其设置 AVTextStyleRule。
// currentPlayer is our instance of the AVPlayer
if let currItem = currentPlayer?.currentItem,
let rule = AVTextStyleRule(textMarkupAttributes: [kCMTextMarkupAttribute_OrthogonalLinePositionPercentageRelativeToWritingDirection as String: 93]) {
// 93% from the top of the video
currItem.textStyleRules = [rule]
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)