AVPlayerPlaybackCoordinator
A playback coordinator subclass that coordinates the playback of player objects in a connected group.
Declaration
class AVPlayerPlaybackCoordinatorOverview
This object coordinates the state of AVPlayer objects. You don’t create an instance of the coordinator, but instead access the player’s instance through its playbackCoordinator property.
Use the standard interfaces of AVPlayer to control playback in your app. The coordinator automatically intercepts calls that affect transport control state, like setRate(_:time:atHostTime:), pause(), and seek(to:completionHandler:), and propagates them to other participants in the group when appropriate. Similarly, the coordinator observes rate and time changes from other participants and imposes them on the player. If this occurs, the player item posts notifications that identify the originating participant.
[Image]
This object may automatically suspend coordinated playback when a system state change causes the player’s timeControlStatus value to change from a playing state to a waiting or paused state. A suspension that begins because the player enters a waiting state due to an event like a network stall or interstitial playback, ends automatically when the player finishes waiting. However, if the system pauses playback due to a system state change, such as an audio session interruption, the suspension ends only after the player’s rate changes back to nonzero.