Contents

init(state:defaultPlaybackRate:elapsedTime:timestamp:)

Creates a playback snapshot with the specified state and timing.

Declaration

init(state: MediaPlaybackSnapshot.PlaybackState, defaultPlaybackRate: Float = 1.0, elapsedTime: TimeInterval? = nil, timestamp: Date? = nil)

Parameters

  • state:

    The current playback state.

  • defaultPlaybackRate:

    The baseline rate the player returns to after temporary rate changes. Defaults to 1.0.

  • elapsedTime:

    The current elapsed time, in seconds.

  • timestamp:

    The wall-clock time associated with elapsedTime, used to extrapolate the current position.

Discussion