playerViewController(_:skipToNextChannel:)
Tells the delegate when the user wants to skip to the next channel.
Declaration
optional func playerViewController(_ playerViewController: AVPlayerViewController, skipToNextChannel completion: @escaping @Sendable (Bool) -> Void)optional func playerViewControllerSkipToNextChannel(_ playerViewController: AVPlayerViewController) async -> BoolParameters
- playerViewController:
The player view controller.
- completion:
A completion callback to invoke to dismiss the channel’s interstitial view.
Discussion
To enable channel skipping, adopt this method and replace the current player item with one that reflects the next channel’s content, and call the completion handler to dismiss the channel’s interstitial view. Each call to this method should advance one channel, relative to the previous request, even if the prior request hasn’t yet completed.