คลาส GCKMediaInformationBuilder
ออบเจ็กต์เครื่องมือสร้างสําหรับสร้างอินสแตนซ์ GCKMediaInformation ใหม่หรือที่ดึงมา
เครื่องมือสร้างอาจใช้ในการดึง GCKMediaInformation จากที่มีอยู่:
นอกจากนี้ยังใช้สร้าง GCKMediaInformation ใหม่ตั้งแต่ต้นได้ด้วย
- Since
- 4.0
รับค่า NSObject
- (instancetype) initWithContentURL: |
|
(NSURL *) |
contentURL |
|
สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น
- Parameters
-
contentURL | The URL of the content to be played. |
- Since
- 4.3.4
- (instancetype) initWithEntity: |
|
(NSString *) |
entity |
|
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
|
รหัสเนื้อหาสำหรับสตรีมนี้
- Deprecated:
- ใช้ contentURL และเอนทิตีแทน
URL ของเนื้อหาที่จะเล่น
- Since
- 4.3.4
ประเภทสตรีม
ค่าเริ่มต้นจะเป็น GCKMediaStreamTypeBuffered
- (NSString*) contentType |
|
readwritenonatomiccopy |
รายการช่วงพักโฆษณาในเนื้อหานี้
รายการคลิปช่วงพักโฆษณาในเนื้อหานี้
- (NSTimeInterval) streamDuration |
|
readwritenonatomicassign |
ความยาวของสตรีมเป็นวินาที หรือ INFINITY
หากเป็นสตรีมแบบสด
ค่าเริ่มต้นคือ 0
รูปแบบแทร็กข้อความสำหรับสตรีมนี้
Deep Link ของสื่อที่ Google Assistant ใช้ (หากมี)
- (NSTimeInterval) startAbsoluteTime |
|
readwritenonatomicassign |
เวลาเริ่มต้นของสตรีมในหน่วยวินาทีในเวลา Epoch หรือ kGCKInvalidTimeInterval
หากไม่พร้อมใช้งาน
ค่าเริ่มต้นคือ kGCKInvalidTimeInterval
- Since
- 4.4.1
รูปแบบของกลุ่มเสียง HLS
- Since
- 4.6.0
รูปแบบของกลุ่มวิดีโอ HLS
- Since
- 4.6.0
ข้อมูลที่กำหนดเอง (หากมี)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2023-12-02 UTC
[null,null,["อัปเดตล่าสุด 2023-12-02 UTC"],[[["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"]]