iOS Developer Library

Developer

MediaPlayer Framework Reference MPRemoteCommandEvent Class Reference

Options
Deployment Target:

On This Page
Language:

MPRemoteCommandEvent

Conforms To


Import Statement


Swift

import MediaPlayer

Objective-C

@import MediaPlayer;

Availability


Available in iOS 7.1 and later

The MPRemoteCommandEvent class provides the basic information for a command. It details the command sent and the time the command was sent by the external media player.

The following subclasses provide information for specific events:

  • command command Property

    The command that sent the event. (read-only)

    Declaration

    Swift

    var command: MPRemoteCommand! { get }

    Objective-C

    @property(nonatomic, readonly) MPRemoteCommand *command

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 7.1 and later

  • timestamp timestamp Property

    The time the event occurred. (read-only)

    Declaration

    Swift

    var timestamp: NSTimeInterval { get }

    Objective-C

    @property(nonatomic, readonly) NSTimeInterval timestamp

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 7.1 and later