iOS Developer Library

Developer

MediaPlayer Framework Reference MPSkipIntervalCommand Class Reference

Options
Deployment Target:

On This Page
Language:

MPSkipIntervalCommand

Inheritance


Conforms To


Import Statement


Swift

import MediaPlayer

Objective-C

@import MediaPlayer;

Availability


Available in iOS 7.1 and later.

The MPSkipIntervalCommand class provides additional information for the skip interval command properties described in the MPRemoteCommandCenter class. Apps can provide a set of available skip intervals for a particular media item using the preferredIntervals method.

You use a skip interval to move the playback of a media item, forward or backward, the indicated number of seconds. For example, a forward skip interval of 30 seconds at 2 minutes and 30 seconds into a song would immediately jump to 3 minutes into the song and continue playing. The content skipped is not played.

  • The available skip intervals, in seconds, for a media item.

    Declaration

    Swift

    var preferredIntervals: [AnyObject]!

    Objective-C

    @property(nonatomic, copy) NSArray *preferredIntervals

    Discussion

    The preferredIntervals property holds an array of NSTimeInterval objects that designate different skip intervals for a media item. The skip intervals are defined in seconds.

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 7.1 and later.