GCKAdBreakInfoBuilder 类
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
用于构建新的或派生的 GCKAdBreakInfo 实例的构建器对象。
构建器可用于从现有构造函数派生 GCKAdBreakInfo:
它还可用于从头开始构建新的 GCKAdBreakInfo:
Builder.title = ...;
Builder.content网址 = ...;
Builder.contentID = ...;
- 开始时间
- 4.3.4
此类继承 NSObject。
|
(instancetype) | - initWithAdBreakInfo: |
|
(instancetype) | - initWithAdBreakID:adBreakClipIds: |
|
(instancetype) | - init |
|
(GCKAdBreakInfo *) | - build |
|
- (NSTimeInterval) playbackPosition |
|
readwritenonatomicassign |
- (NSArray<NSString *>*) adBreakClipIDs |
|
readwritenonatomiccopy |
此广告插播时间点中包含的广告插播片段的标识符字符串列表。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe \u003ccode\u003eGCKAdBreakInfoBuilder\u003c/code\u003e class is used to construct or modify instances of \u003ccode\u003eGCKAdBreakInfo\u003c/code\u003e, which represent ad breaks in media content.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the builder to create new ad break information from scratch or derive it from an existing one by setting properties like ad break ID, playback position, and ad clip IDs.\u003c/p\u003e\n"],["\u003cp\u003eThe builder provides properties such as \u003ccode\u003eadBreakID\u003c/code\u003e, \u003ccode\u003eplaybackPosition\u003c/code\u003e, \u003ccode\u003eadBreakClipIDs\u003c/code\u003e, \u003ccode\u003ewatched\u003c/code\u003e, \u003ccode\u003eembedded\u003c/code\u003e, and \u003ccode\u003eexpanded\u003c/code\u003e to define the characteristics of the ad break.\u003c/p\u003e\n"],["\u003cp\u003eBy calling the \u003ccode\u003ebuild\u003c/code\u003e method on the builder, a \u003ccode\u003eGCKAdBreakInfo\u003c/code\u003e instance is created with the specified attributes.\u003c/p\u003e\n"]]],["The `GCKAdBreakInfoBuilder` class constructs `GCKAdBreakInfo` instances. It can derive an instance from an existing one by initializing with `initWithAdBreakInfo:`, then modifying properties like `adBreakID` or `playbackPosition`, and finally calling `build`. It can also create a new instance from scratch with `initWithAdBreakID:`, setting properties like `adBreakID` and `adBreakClipIDs`, `watched`, `embedded` or `expanded`, then using `build`. The builder manages ad break identifiers, playback positions, clip IDs, and watched/embedded/expanded statuses.\n"],null,["# GCKAdBreakInfoBuilder Class\n\n[Instance Methods](#pub-methods) \\| [Properties](#properties) \nGCKAdBreakInfoBuilder Class Reference \n\nOverview\n--------\n\nA builder object for constructing new or derived [GCKAdBreakInfo](/cast/docs/reference/ios/interface_g_c_k_ad_break_info \"A class representing an ad break. \") instances.\n\nThe builder may be used to derive a [GCKAdBreakInfo](/cast/docs/reference/ios/interface_g_c_k_ad_break_info \"A class representing an ad break. \") from an existing one: \n[GCKAdBreakInfoBuilder](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder) \\*builder = \n\\[\\[[GCKAdBreakInfoBuilder](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder) alloc\\] initWithAdBreakInfo:originalAdBreakInfo\\]; \nbuilder.[adBreakID](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#a1f4f45c3317b3a71e59df35f6796e666) = ...; // Change the ad break clip ID. \nbuilder.[playbackPosition](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#aeda06af6203d006f9dab8061bf98e2a2) = 100; // Change the ad break's duration. \n[GCKAdBreakInfo](/cast/docs/reference/ios/interface_g_c_k_ad_break_info) \\*derivedAdBreakInfo = \\[builder build\\];\n\nIt can also be used to construct a new [GCKAdBreakInfo](/cast/docs/reference/ios/interface_g_c_k_ad_break_info \"A class representing an ad break. \") from scratch: \n[GCKAdBreakInfoBuilder](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder) \\*builder = \n\\[\\[[GCKAdBreakInfoBuilder](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder) alloc\\] initWithAdBreakID:...\\]; \nbuilder.title = ...; \nbuilder.contentURL = ...; \nbuilder.contentID = ...; \n// Set all other desired propreties... \n[GCKAdBreakInfo](/cast/docs/reference/ios/interface_g_c_k_ad_break_info) \\*newAdBreakInfo = \\[builder build\\];\n\nSince\n: 4.3.4\n\nInherits NSObject.\n\n|-------------------------------------------------------------------------------|-----------------------------------------|\n| Instance Method Summary ----------------------- ||\n| (instancetype) | - **initWithAdBreakInfo:** |\n| ||\n| (instancetype) | - **initWithAdBreakID:adBreakClipIds:** |\n| ||\n| (instancetype) | - **init** |\n| ||\n| ([GCKAdBreakInfo](/cast/docs/reference/ios/interface_g_c_k_ad_break_info) \\*) | - **build** |\n| ||\n\n|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------|\n| Property Summary ---------------- ||\n| NSString \\* | [adBreakID](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#a1f4f45c3317b3a71e59df35f6796e666) |\n| | A string that uniquely identifies this ad break. [More...](#a1f4f45c3317b3a71e59df35f6796e666) |\n| ||\n| NSTimeInterval | [playbackPosition](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#aeda06af6203d006f9dab8061bf98e2a2) |\n| | The playback position, in seconds, at which this ad will start playing. [More...](#aeda06af6203d006f9dab8061bf98e2a2) |\n| ||\n| NSArray\\\u003c NSString \\* \\\u003e \\* | [adBreakClipIDs](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#a7493cdb48cdbd0131f3206bb92456b64) |\n| | A list of identifier strings for the ad break clips contained by this ad break. [More...](#a7493cdb48cdbd0131f3206bb92456b64) |\n| ||\n| BOOL | [watched](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#a90aff3ef761d0073fa1f2ad5d02e5d01) |\n| | Whether the ad break has already been watched or not. [More...](#a90aff3ef761d0073fa1f2ad5d02e5d01) |\n| ||\n| BOOL | [embedded](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#aa0dcd5a79755cf1c9dce915e3ed9f6f2) |\n| | Whether the ad break is embedded. [More...](#aa0dcd5a79755cf1c9dce915e3ed9f6f2) |\n| ||\n| BOOL | [expanded](/cast/docs/reference/ios/interface_g_c_k_ad_break_info_builder#a29a652c61b1007830dcd694b84435add) |\n| | Whether the ad break is expanded. [More...](#a29a652c61b1007830dcd694b84435add) |\n| ||\n\nProperty Detail\n---------------\n\n|-----------------------------------------------------------|------------------------|\n| |--------------------------| | - (NSString\\*) adBreakID | | readwritenonatomiccopy |\n\nA string that uniquely identifies this ad break. \n\n|---------------------------------------------------------------------------------|--------------------------|\n| |-------------------------------------| | - (NSTimeInterval) playbackPosition | | readwritenonatomicassign |\n\nThe playback position, in seconds, at which this ad will start playing. \n\n|-------------------------------------------------------------------------------------------------|------------------------|\n| |---------------------------------------------| | - (NSArray\\\u003cNSString \\*\\\u003e\\*) adBreakClipIDs | | readwritenonatomiccopy |\n\nA list of identifier strings for the ad break clips contained by this ad break. \n\n|-------------------------------------------|--------------------------|\n| |------------------| | - (BOOL) watched | | readwritenonatomicassign |\n\nWhether the ad break has already been watched or not. \n\n|---------------------------------------------|--------------------------|\n| |-------------------| | - (BOOL) embedded | | readwritenonatomicassign |\n\nWhether the ad break is embedded. \n\n|---------------------------------------------|--------------------------|\n| |-------------------| | - (BOOL) expanded | | readwritenonatomicassign |\n\nWhether the ad break is expanded."]]