Klasa GCKAdBreakInfoBuilder
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Obiekt kreatora do tworzenia nowych lub derywowanych instancji GCKAdBreakInfo.
Kreator pozwala uzyskać GCKAdBreakInfo na podstawie istniejącego:
Możesz go też użyć do utworzenia nowego obiektu GCKAdBreakInfo od zera:
Builder.title = ...;
Builder.contentURL = ...;
Builder.contentID = ...;
- Od
- 4.3.4
Dziedziczy NSObject.
|
(instancetype) | - initWithAdBreakInfo: |
|
(instancetype) | - initWithAdBreakID:adBreakClipIds: |
|
(instancetype) | - init |
|
(GCKAdBreakInfo *) | - build |
|
|
NSString * | adBreakID |
| Ciąg znaków, który jednoznacznie identyfikuje tę przerwę na reklamę. Więcej...
|
|
NSTimeInterval | playbackPosition |
| Pozycja odtwarzania (w sekundach), od której rozpocznie się odtwarzanie reklamy. Więcej...
|
|
NSArray< NSString * > * | adBreakClipIDs |
| Lista ciągów identyfikatorów dla klipów przerwy na reklamę zawartych w danej przerwie na reklamę. Więcej...
|
|
BOOL | watched |
| Wskazuje, czy przerwa na reklamę została już obejrzana. Więcej...
|
|
BOOL | embedded |
| Określa, czy przerwa na reklamę jest umieszczona. Więcej...
|
|
BOOL | expanded |
| Określa, czy przerwa na reklamę jest rozwinięta. Więcej...
|
|
Ciąg znaków, który jednoznacznie identyfikuje tę przerwę na reklamę.
- (NSTimeInterval) playbackPosition |
|
readwritenonatomicassign |
Pozycja odtwarzania (w sekundach), od której rozpocznie się odtwarzanie reklamy.
- (NSArray<NSString *>*) adBreakClipIDs |
|
readwritenonatomiccopy |
Lista ciągów identyfikatorów dla klipów przerwy na reklamę zawartych w danej przerwie na reklamę.
Wskazuje, czy przerwa na reklamę została już obejrzana.
Określa, czy przerwa na reklamę jest umieszczona.
Określa, czy przerwa na reklamę jest rozwinięta.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\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."]]