iOS Developer Library

Developer

AVFoundation Framework Reference AVPlayerItemTrack Class Reference

Options
Deployment Target:

On This Page
Language:

AVPlayerItemTrack

You use an AVPlayerItemTrack object to modify the presentation state of an asset track (AVAssetTrack) being presented by an AVPlayer object.

Inheritance


Conforms To


Import Statement


Swift

import AVFoundation

Objective-C

@import AVFoundation;

Availability


Available in iOS 4.0 and later.
  • The asset track for which the player item represents presentation state. (read-only)

    Declaration

    Swift

    var assetTrack: AVAssetTrack! { get }

    Objective-C

    @property(nonatomic, readonly) AVAssetTrack *assetTrack

    Discussion

    Clients must serialize their access to the resulting AVAssetTrack and related objects on the associated AVPlayer instance’s notification queue. By default, this queue is the main queue.

    This property is not key-value observable.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • enabled enabled Property

    Indicates whether the track is enabled for presentation during playback.

    Declaration

    Swift

    var enabled: Bool

    Objective-C

    @property(nonatomic, assign, getter=isEnabled) BOOL enabled

    Discussion

    This property is not key-value observable.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 4.0 and later.

  • For video media types, indicates the current frame rate of the track as it plays. (read-only)

    Declaration

    Swift

    var currentVideoFrameRate: Float { get }

    Objective-C

    @property(nonatomic, readonly) float currentVideoFrameRate

    Discussion

    If the media type of the assetTrack is AVMediaTypeVideo, the property indicates the current frame rate of the track as it plays, in units of frames per second.

    If the item is not playing, or if the media type of the track is not video, the value of this property is 0.0.

    This property is not key-value observable.

    Import Statement

    Objective-C

    @import AVFoundation;

    Swift

    import AVFoundation

    Availability

    Available in iOS 7.0 and later.