Contents

AVPlayerInterstitialEventMonitor

An object that monitors the scheduling and progress of interstitial events.

Declaration

class AVPlayerInterstitialEventMonitor

Overview

This object monitors interstitial events that exist within the content of the primary items, such as events defined by an HLS media playlist, and also events managed by an AVPlayerInterstitialEventController object. You can access the schedule of interstitial events through the events property.

When it’s time to present an interstitial event, the system suspends playback of the primary item and changes its player’s timeControlStatus to AVPlayer.TimeControlStatus.waitingToPlayAtSpecifiedRate with a reasonForWaitingToPlay value of interstitialEvent. When the system suspends primary playback, it creates player items based on the event’s templateItems to play interstitial content. The interstitial player temporarily assumes the primary player’s output configuration, such as routing its visual output to player layers that reference the primary player. After the interstitial player finishes playback, or its current item otherwise becomes nil, playback of primary content resumes.

Topics

Creating a monitor

Monitoring the current event

Monitoring the event schedule

Monitoring the asset list response

Monitoring skipping

Accessing the players

Structures

See Also

Interstitials