Correct usage of `playbackControlsIncludeTransportBar`

I am using AVPlayerViewController on tvOS and wish to hide the transport bar to implement my own.

The docs here list a property for that functionality playbackControlsIncludeTransportBar https://developer.apple.com/documentation/avkit/avplayerviewcontroller/2874218-playbackcontrolsincludetransport but the same doc also mentions:

Changing the value of this property doesn’t immediately change the visibility of the transport bar.

Without mentioned what DOES change the visibility.

So far I am unable to get it to work.

Code Block
let avPlayerViewController = AVPlayerViewController()
avPlayerViewController.playbackControlsIncludeTransportBar = false
avPlayerViewController.showsPlaybackControls = true
addChild(avPlayerViewController)
avPlayerViewController.didMove(toParent: self)
// adds subview
view.addSubviewAndFillBounds(avPlayerViewController.view)


Any clues or documentation on how to get this to work?

Thanks
To answer my own questions, this is the best way I have found so far.

Code Block
// Setup playback
let item = AVPlayerItem(url: videoURL)
let player = AVPlayer(playerItem: item)
avPlayerViewController.player = player
player.play()
// hides the transport bar
avPlayerViewController.playbackControlsIncludeTransportBar = false
// sets behaviour to disable skipping / scrubbing
avPlayerViewController.skippingBehavior = .skipItem
// optionally set as delegate to skip to next or previous item
avPlayerViewController.delegate = self


https://github.com/piterwilson/DisableTransportBarDemo
Correct usage of `playbackControlsIncludeTransportBar`
 
 
Q