Working with Overlays and Parental Controls in tvOS
Add interactive overlays, parental controls, and livestream channel flipping using a player view controller.
Overview
Configure the Sample Code Project
Only navigation from live streaming supports channel flipping, so you need to replace the assets in this sample with your live content to demonstrate this behavior.
By default, the sample demonstrates automatic support for parental controls. Activate parental restrictions by following the steps below:
Go to Settings > General > Restrictions.
Turn on Restrictions.
Set a passcode (1111 for demonstration purposes; remember this passcode).
Scroll down to the Allowed Content section.
Select Movies and/or TV Shows.
Set a restriction level (for example, PG or PG-13 if you are in the United States).
The first demo video has a rating of PG, and the second has a rating of PG-13. You can find or edit these ratings in MainViewController.swift.
This sample also demonstrates explicit support for parental restrictions by directly calling requestPlaybackRestrictionsAuthorization(_:). You can test explicit support by changing the value of checkParentalControlsExplicitly in the sample.
See Also
tvOS playback and capture
Customizing the tvOS Playback ExperiencePresenting Navigation MarkersWorking with Interstitial ContentPresenting Content Proposals in tvOSSupporting Continuity Camera in your tvOS appAVPlayerViewControllerAVPlayerViewControllerDelegateAVInterstitialTimeRangeAVNavigationMarkersGroupAVContentProposalViewControllerAVDisplayManagerAVContinuityDevicePickerViewControllerAVContinuityDevicePickerViewControllerDelegate