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

自定义数据(如果有)。