Set up NowPlayingInfo for your app
The Now Playing Info API informs the Apple TV app what content a user is watching and the current playback progress of that content. This collected information is what powers the Up Next functionality in the Apple TV app.
The Apple TV app tracks playback progress for all content directly in the app in the Up Next section. Playback activity data is gathered and delivered in two ways, depending on if you use AVKit:
- If you use AVKit (AVPlayerViewController) on tvOS, populate the metadata array of an AVPlayerItem using instances of AVMetadataItem. AVKit on iOS still requires manual reporting.
- For iOS and non-AVKit tvOS, use the MPNowPlayingInfoCenter to manually report playback activity.
Currently, web players aren’t supported for TV app integrations.
Configure your AVAudioSession with an AVAudioSession.Category category as playback
and without mixWithOthers in your AVAudioSession.CategoryOptions.
The metadata reported in the API is different depending on the type of playback, such as video on demand (VOD), live, and event-based streams. To find out what metadata needs to be collected for each type of playback, see the chart in the Now Playing Info section in the Apple TV App and Universal Search Guide.