Search code examples
swiftfocustvosavplayerviewcontroller

tvos how to prevent AVPlayerViewController from gaining focus


Is there a way to prevent the AVPlayerViewController on tvOS from gaining focus?

Since we cannot overreide and implement it as a view controller or a delegate then it is not possible to implement canBecomeFocused or shouldUpdateFocusInContext

Any ideas?


Solution

  • Just putting Juraj's answer in code:

    playerViewController.view.isUserInteractionEnabled = false