GCKMediaInformation-Klasse
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Eine Klasse, die Informationen zu einem Media-Element zusammenfasst.
Erbt von NSObject. Implementiert <NSCopying>.
- (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-Initialisierer; enthält keine Media-Tracks oder Text-Track-Stile.
- 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:
- Verwenden Sie den vorgesehenen Initialisierer.
- (GCKMediaTrack *__nullable) mediaTrackWithID: |
|
(NSInteger) |
trackID |
|
Sucht nach einem Mediatrack mit der angegebenen Track-ID.
- Parameters
-
trackID | The media track ID. |
- Ausgabe
- Das übereinstimmende GCKMediaTrack-Objekt oder
nil
, wenn kein Mediatrack mit der angegebenen ID vorhanden ist.
Die Content-ID für diesen Stream.
- (NSString*) contentType |
|
readnonatomiccopy |
Der Inhaltstyp (MIME-Typ).
Die Metadaten des Medienelements.
Die Liste der Werbeunterbrechungen in diesem Inhalt.
Die Liste der Clips mit Werbeunterbrechungen in diesem Content.
- Seit
- 3.3
- (NSTimeInterval) streamDuration |
|
readnonatomicassign |
Die Länge des Streams in Sekunden oder INFINITY
, wenn es sich um einen Livestream handelt.
Die Mediatracks für diesen Stream.
Der Stil des Text-Tracks für diesen Stream.
Die benutzerdefinierten Daten, falls vorhanden.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-07-26 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-07-26 (UTC)."],[],["The GCKMediaInformation class aggregates data about a media item, including its content ID, stream type, and content type. Key actions include initializing with content details like `contentID`, `streamType`, `contentType`, `metadata`, `streamDuration`, `mediaTracks`, `textTrackStyle`, and `customData`. It also supports legacy initialization, excluding media/text tracks. The class facilitates searching for media tracks by ID, and provides properties for ad breaks, ad break clips, stream duration, and custom data.\n"],null,[]]