فئة GCKAdBreakInfoBuilder
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
كائن أداة إنشاء لإنشاء مثيلات GCKAdBreakInfo جديدة أو مشتقة.
يمكن استخدام أداة الإنشاء لاستخلاص GCKAdBreakInfo من طريقة حالية:
ويمكن استخدامها أيضًا لإنشاء GCKAdBreakInfo جديد من البداية:
Builder.title = ...;
Builder.contentURL = ...;
Builder.contentID = ...;
- منذ
- 4.3.4
تكتسب NSObject.
|
(instancetype) | - initWithAdBreakInfo: |
|
(instancetype) | - initWithAdBreakID:adBreakClipIds: |
|
(instancetype) | - init |
|
(GCKAdBreakInfo *) | - build |
|
سلسلة تحدِّد هذا الفاصل الإعلاني بشكلٍ فريد
- (NSTimeInterval) playbackPosition |
|
readwritenonatomicassign |
موضع التشغيل، بالثواني، الذي يبدأ فيه تشغيل الإعلان.
- (NSArray<NSString *>*) adBreakClipIDs |
|
readwritenonatomiccopy |
قائمة بسلاسل المعرّفات لمقاطع الفواصل الإعلانية التي يتضمّنها هذا الفاصل الإعلاني
ما إذا سبق أن تمّت مشاهدة الفاصل الإعلاني
ما إذا كان الفاصل الإعلاني مضمّنًا
ما إذا تم توسيع الفاصل الإعلاني
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 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."]]