Contents

MediaCommand

A command that describes a media control action for a Now Playing session.

Declaration

struct MediaCommand

Mentioned in

Overview

Use static factory methods to create commands for your session:

var commands: [MediaCommand] {[
    .play { await self.play() },
    .pause { await self.pause() },
    .next { await self.nextTrack() }.enabled(self.hasNextTrack),
]}

Topics

Instance Methods

Type Methods

Enumerations

See Also

Creating commands