iOS Developer Library

Developer

MediaPlayer Framework Reference MPChangePlaybackRateCommand Class Reference

Options
Deployment Target:

On This Page
Language:

MPChangePlaybackRateCommand

Inheritance


Conforms To


Import Statement


Swift

import MediaPlayer

Objective-C

@import MediaPlayer;

Availability


Available in iOS 7.1 and later.

The MPChangePlaybackRateCommand class provides additional information for the playback commands described in the MPRemoteCommandCenter class. Apps can change the current playback rate of a media item to one of the supported rates defined by the supportedPlaybackRates property.

  • The supported playback rates for a media item.

    Declaration

    Swift

    var supportedPlaybackRates: [AnyObject]!

    Objective-C

    @property(nonatomic, copy) NSArray *supportedPlaybackRates

    Discussion

    Contains an array of NSNumber objects. Each object is of type float and designates a supported playback rate. For example, a value of 2.0 would indicate the media item plays at double speed. Negative values are not supported.

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 7.1 and later.