Contents

coordinateRateChange(to:options:)

Coordinates a rate change across all participants, waiting for others to become ready, if necessary.

Declaration

func coordinateRateChange(to rate: Float, options: AVDelegatingPlaybackCoordinatorRateChangeOptions = [])

Parameters

  • rate:

    The playback rate for the group to use.

  • options:

    Additional configuration of the rate change.

Discussion

When the rate changes from zero to nonzero, the coordinator may also wait for participant suspensions from the suspensionReasonsThatTriggerWaiting property.

Don’t call this method if the rate change doesn’t affect the group, or if the group doesn’t have control over local playback temporarily. For example, don’t call the method for a pause that occurs due to an audio session interruption. In those cases, inform the coordinator by beginning a suspension with an appropriate reason.

The suspension stops the coordinator from issuing further commands to its delegate. After beginning a suspension, you can reconfigure your app’s playback object as necessary.

See Also

Coordinating state changes