Contents

togglePlayPause(_:)

Creates a command that toggles between play and pause states.

Declaration

static func togglePlayPause(_ action: @escaping () async throws -> Void) -> MediaCommand

Parameters

  • action:

    The closure the system calls to toggle playback.

See Also

Controlling playback