有没有办法阻止tvOS上的AVPlayerViewController获得焦点?
由于我们无法将其视为视图控制器或委托,因此无法实现canBecomeFocused或shouldUpdateFocusInContext
有什么想法吗?
答案 0 :(得分:1)
只需将Juraj的答案输入代码即可:
playerViewController.view.isUserInteractionEnabled = false
答案 1 :(得分:0)
这些方面的内容对您有所帮助:
func createPlayer() -> AVPlayerViewController {
let player = AVPlayerViewController()
player.view.frame = viewFrame
player.showsPlaybackControls = false
player.view.isUserInteractionEnabled = false
return player
}