Instance Method

playerViewController(_:skipToPreviousChannel:)

Tells the delegate that the user wants to skip to the previous channel.

Declaration

optional func playerViewController(_ playerViewController: AVPlayerViewController, skipToPreviousChannel completion: @escaping (Bool) -> Void)

Parameters

playerViewController

The player view controller.

completion

A completion callback to invoke to dismiss the channel’s interstitial view.

Discussion

Each call to this method should advance one channel, relative to the previous request, even if the prior request hasn’t yet completed. Adopt this method and replace the current player item with one that reflects the previous channel’s content, and call the completion block to dismiss the channel’s interstitial view.

See Also

Responding to Channel Changes

func playerViewController(AVPlayerViewController, skipToNextChannel: (Bool) -> Void)

Tells the delegate that the user wants to skip to the next channel.

func nextChannelInterstitialViewController(for: AVPlayerViewController) -> UIViewController

Asks the delegate for a view controller describing the layout of the next channel interstice.

func previousChannelInterstitialViewController(for: AVPlayerViewController) -> UIViewController

Asks the delegate for a view controller describing the layout of the previous channel’s interstitial view.