tvOS - AVPlayerViewController - How does channel flipping work?

180 Views Asked by At

On tvOS, AVPlayerViewController supports channel flipping on live streams.
(cfr https://developer.apple.com/documentation/avkit/adopting_custom_interactive_overlays_channel_flipping_and_parental_controls_in_tvos_video_playback)

I'v implemented the delegate methods

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

and

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

But I can't get it to work. :)

Does anyone know how this works from a user point of view (with the default remote)?

1

There are 1 best solutions below

0
On BEST ANSWER

I found the answer!

First of all it only works with livestreams such as https://demo-hls5-live.zahs.tv/sd/master.m3u8

Next, perform a swipe from the edge of the remotes trackpad to the center, it will flip to the next or previous channel, by calling the delegate methods.