GCKMediaInformation 类
继承 NSObject、<NSCopy> 和 <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 |
此内容中的广告插播时间点剪辑列表。
- 开始时间
- 3.3
- (NSTimeInterval) streamDuration |
|
readnonatomicassign |
视频流的时长(以秒为单位),如果是直播活动,则为 INFINITY
。
Google 助理使用的媒体的深层链接(如有)。
- 开始时间
- 4.0
VMAP 请求配置(如果有)。
详见数字视频广告投放模板 4.0。如果此字段为非 nil,则系统将忽略所有其他广告相关字段。
- 开始时间
- 4.3.4
- (NSTimeInterval) startAbsoluteTime |
|
readnonatomicassign |
直播开始时间的纪元时间(以秒为单位)。
对于开始时间已知的直播(例如直播电视节目或体育比赛),则为事件开始的纪元时间。否则,它是直播开始时实时可搜索范围的开始时间。
- 开始时间
- 4.4.1
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-02。
[null,null,["最后更新时间 (UTC):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."]]],[]]