GCKMediaInformation 類別
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
繼承 NSObject、<NSclone> 和 <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 |
|
|
| |
已淘汰,
使用 GCKMediaInformationBuilder 初始化 GCKMediaInformation 物件。
- 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 . |
- 開始時間
- 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 |
|
|
| |
已淘汰,
使用 GCKMediaInformationBuilder 初始化 GCKMediaInformation 物件。
- 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 |
|
搜尋具有指定曲目 ID 的媒體音軌。
- Parameters
-
trackID | The media track ID. |
- 傳回
- 相符的 GCKMediaTrack 物件;如果沒有具有指定 ID 的媒體軌,則為
nil
。
- (NSString*) contentType |
|
readnonatomiccopy |
- (NSTimeInterval) streamDuration |
|
readnonatomicassign |
直播影片的長度 (秒);如果是直播活動,則為 INFINITY
。
Google 助理使用的媒體深層連結 (如有)。
- 開始時間
- 4.0
VMAP 要求設定 (如果有的話)。
詳情請參閱數位影片廣告放送範本 4.0。如果這個欄位不是 nil,則系統會忽略所有其他廣告相關欄位。
- 開始時間
- 4.3.4
- (NSTimeInterval) startAbsoluteTime |
|
readnonatomicassign |
直播開始時間的訓練週期 (以秒為單位)。
如果是已經確定開始時間的直播 (例如直播電視節目或運動賽事),則會是活動開始的 Epoch 紀元時間。否則,直播開始時,影片就會進入可搜尋範圍的開始時間。
- 開始時間
- 4.4.1
HTTP 即時串流音訊區段的格式。
- 開始時間
- 4.6.0
HTTP 即時串流影片片段的格式。
- 開始時間
- 4.6.0
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2023-12-02 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2023-12-02 (世界標準時間)。"],[[["The `GCKMediaInformation` class stores details about a media item, like content ID, URL, type, metadata, stream duration, and more."],["It includes properties for ad breaks, ad break clips, media tracks, text track style, and custom data."],["Two deprecated initializers are listed, with a recommendation to use `GCKMediaInformationBuilder` instead."],["The `mediaTrackWithID:` method helps find a specific media track using its ID."],["Several properties provide detailed information about the media, such as content ID, URL, stream type, metadata, ad breaks, stream duration, and custom data."]]],[]]