GCKMediaInformation 類別

GCKMediaInformation 類別參考

總覽

彙整媒體項目相關資訊的類別。

沿用 NSObject、<NSCopy> 和 <NSSecureCoding> 的 NSObject。

執行個體方法摘要

(instancetype) - initWithContentID:streamType:contentType:metadata:adBreaks:adBreakClips:streamDuration:mediaTracks:textTrackStyle:customData:
 已不適用。更多...
 
(instancetype) - initWithContentID:streamType:contentType:metadata:streamDuration:mediaTracks:textTrackStyle:customData:
 已不適用。更多...
 
(nullable GCKMediaTrack *) - mediaTrackWithID:
 搜尋具有指定曲目 ID 的媒體曲目。更多...
 

屬性摘要

NSString * contentID
 這個串流的內容 ID。更多...
 
NSURL * contentURL
 播放內容的網址。更多...
 
GCKMediaStreamType streamType
 串流類型。更多...
 
NSString * contentType
 內容 (MIME) 類型。更多...
 
GCKMediaMetadatametadata
 媒體項目中繼資料。更多...
 
NSArray< GCKAdBreakInfo * > * adBreaks
 此內容中的廣告插播清單。更多...
 
NSArray< GCKAdBreakClipInfo * > * adBreakClips
 這類內容中的廣告插播片段清單。更多...
 
NSTimeInterval streamDuration
 串流的長度 (以秒為單位)。如果是即時串流,則為 INFINITY更多...
 
NSArray< GCKMediaTrack * > * mediaTracks
 這個串流的媒體軌。更多...
 
GCKMediaTextTrackStyletextTrackStyle
 這個串流的文字軌樣式樣式。更多...
 
NSString * entity
 Google 助理所使用的媒體深層連結 (如果有的話)。更多...
 
GCKVASTAdsRequestVMAP
 VMAP 要求設定 (如果有的話)。更多...
 
NSTimeInterval startAbsoluteTime
 直播活動的紀元時間,以秒為單位。更多...
 
GCKHLSSegmentFormat hlsSegmentFormat
 HLS 音訊片段的格式。更多...
 
GCKHLSVideoSegmentFormat hlsVideoSegmentFormat
 HLS 影片片段的格式。更多...
 
id customData
 自訂資料 (如果有的話)。更多...
 

方法說明

- (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
contentIDThe content ID.
streamTypeThe stream type.
contentTypeThe content (MIME) type.
metadataThe media item metadata.
adBreaksThe list of ad breaks in this content.
adBreakClipsThe list of ad break clips in this content.
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.
辛策
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
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.
- (nullable GCKMediaTrack *) mediaTrackWithID: (NSInteger)  trackID

搜尋具有指定曲目 ID 的媒體曲目。

Parameters
trackIDThe media track ID.
傳回
相符的 GCKMediaTrack 物件;如果沒有指定 ID 的媒體曲目,則為 nil

資源詳細資料

- (NSString*) contentID
readnonatomiccopy

這個串流的內容 ID。

- (NSURL*) contentURL
readnonatomiccopy

播放內容的網址。

辛策
4.3.4
- (GCKMediaStreamType) streamType
readnonatomicassign

串流類型。

- (NSString*) contentType
readnonatomiccopy

內容 (MIME) 類型。

- (GCKMediaMetadata*) metadata
readnonatomicassign

媒體項目中繼資料。

- (NSArray<GCKAdBreakInfo *>*) adBreaks
readnonatomiccopy

此內容中的廣告插播清單。

- (NSArray<GCKAdBreakClipInfo *>*) adBreakClips
readnonatomiccopy

這類內容中的廣告插播片段清單。

辛策
3.3
- (NSTimeInterval) streamDuration
readnonatomicassign

串流的長度 (以秒為單位)。如果是即時串流,則為 INFINITY

- (NSArray<GCKMediaTrack *>*) mediaTracks
readnonatomiccopy

這個串流的媒體軌。

- (GCKMediaTextTrackStyle*) textTrackStyle
readnonatomiccopy

這個串流的文字軌樣式樣式。

- (NSString*) entity
readnonatomiccopy

Google 助理所使用的媒體深層連結 (如果有的話)。

辛策
4.0
- (GCKVASTAdsRequest*) VMAP
readnonatomicassign

VMAP 要求設定 (如果有的話)。

詳情請參閱:數位影片廣告放送範本 4.0。如果不是,則系統會忽略所有其他的廣告相關欄位。

辛策
4.3.4
- (NSTimeInterval) startAbsoluteTime
readnonatomicassign

直播活動的紀元時間,以秒為單位。

如果直播影片有已知的開始時間 (例如電視節目或體育賽事),可能是活動開始的紀元時間。否則,系統會開始執行串流的可搜尋範圍開始時間。

辛策
4.4.1
- (GCKHLSSegmentFormat) hlsSegmentFormat
readnonatomicassign

HLS 音訊片段的格式。

辛策
4.6.0
- (GCKHLSVideoSegmentFormat) hlsVideoSegmentFormat
readnonatomicassign

HLS 影片片段的格式。

辛策
4.6.0
- (id) customData
readnonatomicassign

自訂資料 (如果有的話)。