GCKMediaInformationBuilder 类
用于构建新的或派生的 GCKMediaInformation 实例的构建器对象。
构建器可用于从现有构造函数派生 GCKMediaInformation:
它还可用于从头开始构建新的 GCKMediaInformation:
- 开始时间
- 4.0
此类继承 NSObject。
- (instancetype) initWithContentURL: |
|
(NSURL *) |
contentURL |
|
- (instancetype) initWithEntity: |
|
(NSString *) |
entity |
|
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
|
数据流类型。
默认为 GCKMediaStreamTypeBuffered。
- (NSString*) contentType |
|
readwritenonatomiccopy |
- (NSTimeInterval) streamDuration |
|
readwritenonatomicassign |
视频流的时长(以秒为单位),如果是直播活动,则为 INFINITY
。
默认值为 0。
VMAP 请求配置(如果有)。
详见数字视频广告投放模板 4.0。如果此字段为非 nil,则系统将忽略所有其他广告相关字段。
- 开始时间
- 4.3.4
- (NSTimeInterval) startAbsoluteTime |
|
readwritenonatomicassign |
数据流的开始时间(以新纪元时间为单位的秒数),如果不可用,则为 kGCKInvalidTimeInterval
。
默认为 kGCKInvalidTimeInterval
。
- 开始时间
- 4.4.1
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-12-02。
[null,null,["最后更新时间 (UTC):2023-12-02。"],[[["The `GCKMediaInformationBuilder` class is used to construct new or modify existing `GCKMediaInformation` instances, which hold details about media items."],["It provides methods to initialize with content URL, entity, a base `GCKMediaInformation` object, or content ID (deprecated)."],["Developers can set various attributes of the media, like content type, stream type, metadata, ad breaks, duration, and custom data."],["The `build` method creates a `GCKMediaInformation` object from the builder's current state."],["Some properties like `contentID` are deprecated in favor of `contentURL` and `entity` for better media identification."]]],["The `GCKMediaInformationBuilder` class allows constructing new or derived `GCKMediaInformation` instances. To create a new instance, initialize a builder with `initWithContentURL` or `initWithEntity`, set properties like `contentType`, `streamType`, and `metadata`, and then call `build`. To derive from an existing instance, initialize the builder with `initWithMediaInformation`, modify properties such as `contentID` or `streamDuration`, and use `build`. Key properties include `contentURL`, `streamType`, `contentType`, `streamDuration`, `metadata`, and `entity`, that describe the media and their respective values.\n"]]