Lớp GCKAdBreakInfoBuilder
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Một đối tượng trình tạo để tạo các thực thể GCKAdBreakInfo mới hoặc dẫn xuất.
Bạn có thể sử dụng trình tạo này để lấy GCKAdBreakInfo từ một trình tạo hiện có:
Bạn cũng có thể sử dụng mã này để tạo GCKAdBreakInfo mới từ đầu:
Builder.title = ...;
Builder.contentURL = ...;
Builder.contentID = ...;
- Năm thành lập
- 4.3.4
Kế thừa NSObject.
|
(instancetype) | - initWithAdBreakInfo: |
|
(instancetype) | - initWithAdBreakID:adBreakClipIds: |
|
(instancetype) | - init |
|
(GCKAdBreakInfo *) | - build |
|
Một chuỗi xác định duy nhất điểm chèn quảng cáo này.
- (NSTimeInterval) playbackPosition |
|
readwritenonatomicassign |
Vị trí phát, tính bằng giây, mà tại đó quảng cáo này sẽ bắt đầu phát.
- (NSArray<NSString *>*) adBreakClipIDs |
|
readwritenonatomiccopy |
Danh sách chuỗi giá trị nhận dạng cho các đoạn của điểm chèn quảng cáo có trong điểm chèn quảng cáo này.
Liệu bạn đã xem điểm chèn quảng cáo hay chưa.
Liệu điểm chèn quảng cáo có được nhúng hay không.
Liệu điểm chèn quảng cáo có được mở rộng hay không.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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."]]