Page Summary
-
GCKMediaInformation is a class that aggregates information about a media item.
-
It inherits from NSObject and implements NSCopying.
-
It includes methods for initialization and finding media tracks by ID.
-
Properties of GCKMediaInformation include content ID, stream type, content type, metadata, ad break information, stream duration, media tracks, text track style, and custom data.
-
There is a designated initializer and a deprecated legacy initializer for creating GCKMediaInformation instances.
Overview
A class that aggregates information about a media item.
Inherits NSObject. Implements <NSCopying>.
Method Detail
| - (instancetype) initWithContentID: | (NSString *) | contentID | |
| streamType: | ( GCKMediaStreamType ) | streamType | |
| contentType: | (NSString *) | contentType | |
| metadata: | ( GCKMediaMetadata *__nullable) | metadata | |
| streamDuration: | (NSTimeInterval) | streamDuration | |
| mediaTracks: | (NSArray< GCKMediaTrack * > *__nullable) | mediaTracks | |
| textTrackStyle: | ( GCKMediaTextTrackStyle *__nullable) | textTrackStyle | |
| customData: | (id __nullable) | customData | |
Designated initializer.
- Parameters
-
contentID The content ID. streamType The stream type. contentType The content (MIME) type. metadata The media item metadata. streamDuration The stream duration. mediaTracks The media tracks, if any, otherwise nil.textTrackStyle The text track style, if any, otherwise nil.customData The custom application-specific data. Must either be an object that can be serialized to JSON using NSJSONSerialization , or nil.
| - (instancetype) initWithContentID: | (NSString *) | contentID | |
| streamType: | ( GCKMediaStreamType ) | streamType | |
| contentType: | (NSString *) | contentType | |
| metadata: | ( GCKMediaMetadata *__nullable) | metadata | |
| streamDuration: | (NSTimeInterval) | streamDuration | |
| customData: | (id __nullable) | customData | |
Legacy initializer; does not include media tracks or text track style.
- Parameters
-
contentID The content ID. streamType The stream type. contentType The content (MIME) type. metadata The media item metadata. streamDuration The stream duration. customData Custom application-specific data. Must either be an object that can be serialized to JSON using NSJSONSerialization , or nil.
- Deprecated:
- Use the designated initializer.
| - ( GCKMediaTrack *__nullable) mediaTrackWithID: | (NSInteger) | trackID |
Searches for a media track with the given track ID.
- Parameters
- trackIDThe media track ID.
- Returns
- The matching GCKMediaTrack
object, or
nilif there is no media track with the given ID.
Property Detail
The content ID for this stream.
The stream type.
The content (MIME) type.
The media item metadata.
The list of ad breaks in this content.
The list of ad break clips in this content.
- Since
- 3.3
The length of the stream, in seconds, or INFINITY
if it is a live stream.
The media tracks for this stream.
The text track style for this stream.
The custom data, if any.

