MPTimedMetadata Class Reference
| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/MediaPlayer.framework |
| Availability | Available in iOS 4.0 and later. |
| Declared in | MPMoviePlayerController.h |
Overview
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.
Tasks
Extracting Timed Metadata from a Stream
-
allMetadataproperty -
keyproperty -
keyspaceproperty -
timestampproperty -
valueproperty
Properties
allMetadata
A dictionary containing all the metadata in the object. (read-only)
Discussion
To retrieve metadata from the dictionary, use the keys described in “Timed Metadata Dictionary Keys.”
Availability
- Available in iOS 4.0 and later.
Declared In
MPMoviePlayerController.hkey
A key that identifies a piece of timed metadata. (read-only)
Availability
- Available in iOS 4.0 and later.
Declared In
MPMoviePlayerController.hkeyspace
The namespace of the identifying key. (read-only)
Availability
- Available in iOS 4.0 and later.
Declared In
MPMoviePlayerController.htimestamp
The timestamp of the metadata, in the timebase of the media stream. (read-only)
Availability
- Available in iOS 4.0 and later.
Declared In
MPMoviePlayerController.hvalue
The timed metadata. (read-only)
Availability
- Available in iOS 4.0 and later.
Declared In
MPMoviePlayerController.hConstants
Timed Metadata Dictionary Keys
Dictionary keys for use with the allMetadata property. All keys are optional.
NSString *const MPMoviePlayerTimedMetadataKeyName; NSString *const MPMoviePlayerTimedMetadataKeyInfo; NSString *const MPMoviePlayerTimedMetadataKeyMIMEType; NSString *const MPMoviePlayerTimedMetadataKeyDataType; NSString *const MPMoviePlayerTimedMetadataKeyLanguageCode;
Constants
MPMoviePlayerTimedMetadataKeyNameThe name of the timed metadata key.
Available in iOS 4.0 and later.
Declared in
MPMoviePlayerController.h.MPMoviePlayerTimedMetadataKeyInfoArbitrary information about the timed metadata.
Available in iOS 4.0 and later.
Declared in
MPMoviePlayerController.h.MPMoviePlayerTimedMetadataKeyMIMETypeThe MIME type for the timed metadata.
Available in iOS 4.0 and later.
Declared in
MPMoviePlayerController.h.MPMoviePlayerTimedMetadataKeyDataTypeThe data type of the timed metadata.
Available in iOS 4.0 and later.
Declared in
MPMoviePlayerController.h.MPMoviePlayerTimedMetadataKeyLanguageCodeThe metadata language, expressed using ISO 639-2, in a string object.
Available in iOS 4.0 and later.
Declared in
MPMoviePlayerController.h.
Notifications
MPMoviePlayerTimedMetadataUpdatedNotification
Availability
- Available in iOS 4.0 and later.
Declared In
MPMoviePlayerController.hMPMoviePlayerTimedMetadataUserInfoKey
MPTimedMetadata objects.Availability
- Available in iOS 4.0 and later.
Declared In
MPMoviePlayerController.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-04-12)