iOS Developer Library

Developer

MediaPlayer 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.

Inheritance


Conforms To


Import Statement


Swift

import MediaPlayer

Objective-C

@import MediaPlayer;

Availability


Available in iOS 4.0 and later.
  • 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.

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 4.0 and later.

  • key key 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

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 4.0 and later.

  • keyspace keyspace Property

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

    Declaration

    Swift

    var keyspace: String! { get }

    Objective-C

    @property(nonatomic, readonly) NSString *keyspace

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 4.0 and later.

  • timestamp timestamp 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

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 4.0 and later.

  • value value Property

    The timed metadata. (read-only)

    Declaration

    Swift

    var value: AnyObject! { get }

    Objective-C

    @property(nonatomic, readonly) id value

    Import Statement

    Objective-C

    @import MediaPlayer;

    Swift

    import MediaPlayer

    Availability

    Available in iOS 4.0 and later.

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

    Declaration

    Swift

    let MPMoviePlayerTimedMetadataKeyName: NSString! let MPMoviePlayerTimedMetadataKeyInfo: NSString! let MPMoviePlayerTimedMetadataKeyMIMEType: NSString! let MPMoviePlayerTimedMetadataKeyDataType: NSString! let MPMoviePlayerTimedMetadataKeyLanguageCode: NSString!

    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.

    • MPMoviePlayerTimedMetadataKeyInfo

      MPMoviePlayerTimedMetadataKeyInfo

      Arbitrary information about the timed metadata.

      Available in iOS 4.0 and later.

    • MPMoviePlayerTimedMetadataKeyMIMEType

      MPMoviePlayerTimedMetadataKeyMIMEType

      The MIME type for the timed metadata.

      Available in iOS 4.0 and later.

    • MPMoviePlayerTimedMetadataKeyDataType

      MPMoviePlayerTimedMetadataKeyDataType

      The data type of the timed metadata.

      Available in iOS 4.0 and later.

    • MPMoviePlayerTimedMetadataKeyLanguageCode

      MPMoviePlayerTimedMetadataKeyLanguageCode

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

      Available in iOS 4.0 and later.