iOS Developer Library

Developer

Media Player Framework Reference MPTimedMetadata Class Reference

Options
Deployment Target:

On This Page
Language:

MPTimedMetadata

An instance of the MPTimedMetadata class, called a timed metadata object, carries time-based information within HTTP streamed media. Content providers can embed such objects when creating a stream. The properties and constants in this class let you extract the metadata as you play the stream using an MPMoviePlayerController object.

For example, the provider of a live sports video stream could use MPTimedMetadata instances to embed game scores, with timestamps, in the stream. On the client side—that is, on the user’s device—their application could employ the properties of this class to update their app’s user interface in real time during the game.

A Javascript implementation of this class is also available for use by web-based applications.

  • allMetadata allMetadata (iOS 9.0) Property

    A dictionary containing all the metadata in the object. (read-only)

    Declaration

    Swift

    var allMetadata: [NSObject : AnyObject]! { get }

    Objective-C

    @property(nonatomic, readonly) NSDictionary *allMetadata

    Discussion

    To retrieve metadata from the dictionary, use the keys described in Timed Metadata Dictionary Keys.

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 9.0.

  • key key (iOS 9.0) Property

    A key that identifies a piece of timed metadata. (read-only)

    Declaration

    Swift

    var key: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *key

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 9.0.

  • keyspace keyspace (iOS 9.0) Property

    The namespace of the identifying key. (read-only)

    Declaration

    Swift

    var keyspace: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *keyspace

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 9.0.

  • timestamp timestamp (iOS 9.0) Property

    The timestamp of the metadata, in the timebase of the media stream. (read-only)

    Declaration

    Swift

    var timestamp: NSTimeInterval { get }

    Objective-C

    @property(nonatomic, readonly) NSTimeInterval timestamp

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 9.0.

  • value value (iOS 9.0) Property

    The timed metadata. (read-only)

    Declaration

    Swift

    var value: AnyObject! { get }

    Objective-C

    @property(nonatomic, readonly) id value

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 9.0.

  • Dictionary keys for use with the allMetadata property. All keys are optional.

    Declaration

    Swift

    let MPMoviePlayerTimedMetadataKeyName: String let MPMoviePlayerTimedMetadataKeyInfo: String let MPMoviePlayerTimedMetadataKeyMIMEType: String let MPMoviePlayerTimedMetadataKeyDataType: String let MPMoviePlayerTimedMetadataKeyLanguageCode: String

    Objective-C

    NSString *const MPMoviePlayerTimedMetadataKeyName; NSString *const MPMoviePlayerTimedMetadataKeyInfo; NSString *const MPMoviePlayerTimedMetadataKeyMIMEType; NSString *const MPMoviePlayerTimedMetadataKeyDataType; NSString *const MPMoviePlayerTimedMetadataKeyLanguageCode;

    Constants

    • MPMoviePlayerTimedMetadataKeyName

      MPMoviePlayerTimedMetadataKeyName

      The name of the timed metadata key.

      Available in iOS 4.0 and later.

      Deprecated in iOS 9.0.

    • MPMoviePlayerTimedMetadataKeyInfo

      MPMoviePlayerTimedMetadataKeyInfo

      Arbitrary information about the timed metadata.

      Available in iOS 4.0 and later.

      Deprecated in iOS 9.0.

    • MPMoviePlayerTimedMetadataKeyMIMEType

      MPMoviePlayerTimedMetadataKeyMIMEType

      The MIME type for the timed metadata.

      Available in iOS 4.0 and later.

      Deprecated in iOS 9.0.

    • MPMoviePlayerTimedMetadataKeyDataType

      MPMoviePlayerTimedMetadataKeyDataType

      The data type of the timed metadata.

      Available in iOS 4.0 and later.

      Deprecated in iOS 9.0.

    • MPMoviePlayerTimedMetadataKeyLanguageCode

      MPMoviePlayerTimedMetadataKeyLanguageCode

      The metadata language, expressed using ISO 639-2, in a string object.

      Available in iOS 4.0 and later.

      Deprecated in iOS 9.0.