GCKMediaInformation Class
Stay organized with collections
Save and categorize content based on your preferences.
A class that aggregates information about a media item.
Inherits NSObject, <NSCopying>, and <NSSecureCoding>.
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
streamType: |
|
(GCKMediaStreamType) |
streamType |
contentType: |
|
(NSString *) |
contentType |
metadata: |
|
(nullable GCKMediaMetadata *) |
metadata |
adBreaks: |
|
(nullable NSArray< GCKAdBreakInfo * > *) |
adBreaks |
adBreakClips: |
|
(nullable NSArray< GCKAdBreakClipInfo * > *) |
adBreakClips |
streamDuration: |
|
(NSTimeInterval) |
streamDuration |
mediaTracks: |
|
(nullable NSArray< GCKMediaTrack * > *) |
mediaTracks |
textTrackStyle: |
|
(nullable GCKMediaTextTrackStyle *) |
textTrackStyle |
customData: |
|
(nullable id) |
customData |
|
|
| |
Deprecated.
Use GCKMediaInformationBuilder to initialize GCKMediaInformation objects.
- Parameters
-
contentID | The content ID. |
streamType | The stream type. |
contentType | The content (MIME) type. |
metadata | The media item metadata. |
adBreaks | The list of ad breaks in this content. |
adBreakClips | The list of ad break clips in this content. |
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 . |
- Since
- 4.3
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
streamType: |
|
(GCKMediaStreamType) |
streamType |
contentType: |
|
(NSString *) |
contentType |
metadata: |
|
(nullable GCKMediaMetadata *) |
metadata |
streamDuration: |
|
(NSTimeInterval) |
streamDuration |
mediaTracks: |
|
(nullable NSArray< GCKMediaTrack * > *) |
mediaTracks |
textTrackStyle: |
|
(nullable GCKMediaTextTrackStyle *) |
textTrackStyle |
customData: |
|
(nullable id) |
customData |
|
|
| |
Deprecated.
Use GCKMediaInformationBuilder to initialize GCKMediaInformation objects.
- 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 . |
- (nullable GCKMediaTrack *) mediaTrackWithID: |
|
(NSInteger) |
trackID |
|
Searches for a media track with the given track ID.
- Parameters
-
trackID | The media track ID. |
- Returns
- The matching GCKMediaTrack object, or
nil
if there is no media track with the given ID.
The content ID for this stream.
The URL of the content to be played.
- Since
- 4.3.4
- (NSString*) contentType |
|
readnonatomiccopy |
The list of ad breaks in this content.
The list of ad break clips in this content.
- Since
- 3.3
- (NSTimeInterval) streamDuration |
|
readnonatomicassign |
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 deep link for the media as used by Google Assistant, if any.
- Since
- 4.0
- (NSTimeInterval) startAbsoluteTime |
|
readnonatomicassign |
The epoch time, in seconds, of a live stream's start time.
For live streams that have a known start time, e.g. a live TV show or sport game, it would be the epoch time that the event started. Otherwise, it will be start time of the live seekable range when the streaming started.
- Since
- 4.4.1
The format of the HLS audio segment.
- Since
- 4.6.0
The format of the HLS video segment.
- Since
- 4.6.0
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-09-18 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."]]