GCKMediaInformation 類別
沿用 NSObject。實作 <NSCopy>。
- (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 |
|
|
| |
指定初始化器。
- 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 |
|
|
| |
舊版初始化器,不包含媒體曲目或文字音軌樣式。
- 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:
- 使用指定的初始化器。
- (GCKMediaTrack *__nullable) mediaTrackWithID: |
|
(NSInteger) |
trackID |
|
搜尋具有指定曲目 ID 的媒體曲目。
- Parameters
-
trackID | The media track ID. |
- 傳回
- 相符的 GCKMediaTrack 物件;如果沒有指定 ID 的媒體曲目,則為
nil
。
- (NSString*) contentType |
|
readnonatomiccopy |
- (NSTimeInterval) streamDuration |
|
readnonatomicassign |
串流的長度 (以秒為單位)。如果是即時串流,則為 INFINITY
。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-12-06 (世界標準時間)。
[null,null,["上次更新時間:2022-12-06 (世界標準時間)。"],[[["The `GCKMediaInformation` class stores details about a media item, such as its content ID, stream type, content type, metadata, stream duration, and custom data."],["It provides methods to initialize media information objects with or without media tracks and text track styles."],["Developers can access properties like `contentID`, `streamType`, `contentType`, `metadata`, `streamDuration`, and more to retrieve media information."],["It includes methods to find specific media tracks using their track IDs."],["The class inherits from `NSObject` and implements the `NSCopying` protocol."]]],[]]