GCKMediaInformation 類別

GCKMediaInformation 類別參考資料

總覽

這個類別會匯總媒體項目的相關資訊。

繼承 NSObject。實作 <NSCopying>。

執行個體方法摘要

(instancetype) - initWithContentID:streamType:contentType:metadata:streamDuration:mediaTracks:textTrackStyle:customData:
 指定初始化器。更多...
 
(instancetype) - initWithContentID:streamType:contentType:metadata:streamDuration:customData:
 舊版初始值設定工具,不包含媒體軌或文字軌樣式。更多...
 
(GCKMediaTrack *__nullable) - mediaTrackWithID:
 搜尋具有指定軌 ID 的媒體軌。更多...
 

房源摘要

NSString * contentID
 這個串流的內容 ID。更多...
 
GCKMediaStreamType streamType
 串流類型。更多...
 
NSString * contentType
 內容 (MIME) 類型。更多...
 
GCKMediaMetadatametadata
 媒體項目中繼資料。更多...
 
NSArray< GCKAdBreakInfo * > * adBreaks
 這項內容中的廣告插播清單。更多...
 
NSArray< GCKAdBreakClipInfo * > * adBreakClips
 這項內容中的廣告時段片段清單。更多...
 
NSTimeInterval streamDuration
 串流長度 (以秒為單位),如果是直播,則為 INFINITY更多...
 
NSArray< GCKMediaTrack * > * mediaTracks
 這個串流的媒體軌。更多...
 
GCKMediaTextTrackStyletextTrackStyle
 這個串流的文字軌樣式。更多...
 
id customData
 自訂資料 (如有)。更多...
 

方法詳細資料

- (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
contentIDThe content ID.
streamTypeThe stream type.
contentTypeThe content (MIME) type.
metadataThe media item metadata.
streamDurationThe stream duration.
mediaTracksThe media tracks, if any, otherwise nil.
textTrackStyleThe text track style, if any, otherwise nil.
customDataThe 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
contentIDThe content ID.
streamTypeThe stream type.
contentTypeThe content (MIME) type.
metadataThe media item metadata.
streamDurationThe stream duration.
customDataCustom 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
trackIDThe media track ID.
傳回
相符的 GCKMediaTrack 物件,如果沒有具有指定 ID 的媒體軌,則為 nil

資源詳細資料

- (NSString*) contentID
readnonatomiccopy

這個串流的內容 ID。

- (GCKMediaStreamType) streamType
readnonatomicassign

串流類型。

- (NSString*) contentType
readnonatomiccopy

內容 (MIME) 類型。

- (GCKMediaMetadata*) metadata
readnonatomicstrong

媒體項目中繼資料。

- (NSArray<GCKAdBreakInfo *>*) adBreaks
readnonatomiccopy

這項內容中的廣告插播清單。

- (NSArray<GCKAdBreakClipInfo *>*) adBreakClips
readnonatomiccopy

這項內容中的廣告時段片段清單。

成立時間
3.3
- (NSTimeInterval) streamDuration
readnonatomicassign

串流長度 (以秒為單位),如果是直播,則為 INFINITY

- (NSArray<GCKMediaTrack *>*) mediaTracks
readnonatomiccopy

這個串流的媒體軌。

- (GCKMediaTextTrackStyle*) textTrackStyle
readnonatomiccopy

這個串流的文字軌樣式。

- (id) customData
readnonatomicstrong

自訂資料 (如有)。