คลาส GCKMediaInformation
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คลาสที่รวบรวมข้อมูลเกี่ยวกับรายการสื่อ
รับค่า NSObject ใช้ <NSCopying>
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
streamType: |
|
(GCKMediaStreamType) |
streamType |
contentType: |
|
(NSString *) |
contentType |
metadata: |
|
(GCKMediaMetadata *__nullable) |
metadata |
streamDuration: |
|
(NSTimeInterval) |
streamDuration |
mediaTracks: |
|
(NSArray< GCKMediaTrack * > *__nullable) |
mediaTracks |
textTrackStyle: |
|
(GCKMediaTextTrackStyle *__nullable) |
textTrackStyle |
customData: |
|
(id __nullable) |
customData |
|
|
| |
ตัวเริ่มต้นที่กำหนด
- Parameters
-
contentID | The content ID. |
streamType | The stream type. |
contentType | The content (MIME) type. |
metadata | The media item metadata. |
streamDuration | The stream duration. |
mediaTracks | The media tracks, if any, otherwise nil . |
textTrackStyle | The text track style, if any, otherwise nil . |
customData | The custom application-specific data. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil . |
- (instancetype) initWithContentID: |
|
(NSString *) |
contentID |
streamType: |
|
(GCKMediaStreamType) |
streamType |
contentType: |
|
(NSString *) |
contentType |
metadata: |
|
(GCKMediaMetadata *__nullable) |
metadata |
streamDuration: |
|
(NSTimeInterval) |
streamDuration |
customData: |
|
(id __nullable) |
customData |
|
|
| |
ตัวเริ่มต้นเดิม ไม่รวมแทร็กสื่อหรือสไตล์แทร็กข้อความ
- Parameters
-
contentID | The content ID. |
streamType | The stream type. |
contentType | The content (MIME) type. |
metadata | The media item metadata. |
streamDuration | The stream duration. |
customData | Custom application-specific data. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil . |
- Deprecated:
- ใช้ตัวเริ่มต้นที่กำหนด
- (GCKMediaTrack *__nullable) mediaTrackWithID: |
|
(NSInteger) |
trackID |
|
ค้นหาแทร็กสื่อที่มีรหัสแทร็กที่ระบุ
- Parameters
-
trackID | The media track ID. |
- การคืนสินค้า
- ออบเจ็กต์ GCKMediaTrack ที่ตรงกัน หรือ
nil
หากไม่มีแทร็กสื่อที่มีรหัสที่ระบุ
รหัสเนื้อหาสำหรับสตรีมนี้
- (NSString*) contentType |
|
readnonatomiccopy |
รายการช่วงพักโฆษณาในเนื้อหานี้
รายการคลิปช่วงพักโฆษณาในเนื้อหานี้
- Since
- 3.3
- (NSTimeInterval) streamDuration |
|
readnonatomicassign |
ความยาวของสตรีมเป็นวินาที หรือ INFINITY
หากเป็นสตรีมแบบสด
รูปแบบแทร็กข้อความสำหรับสตรีมนี้
ข้อมูลที่กำหนดเอง (หากมี)
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[null,null,["อัปเดตล่าสุด 2025-07-26 UTC"],[[["\u003cp\u003eThe \u003ccode\u003eGCKMediaInformation\u003c/code\u003e class stores details about a media item, such as its content ID, stream type, content type, metadata, stream duration, and custom data.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to initialize media information objects with or without media tracks and text track styles.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access properties like \u003ccode\u003econtentID\u003c/code\u003e, \u003ccode\u003estreamType\u003c/code\u003e, \u003ccode\u003econtentType\u003c/code\u003e, \u003ccode\u003emetadata\u003c/code\u003e, \u003ccode\u003estreamDuration\u003c/code\u003e, and more to retrieve media information.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods to find specific media tracks using their track IDs.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003eNSObject\u003c/code\u003e and implements the \u003ccode\u003eNSCopying\u003c/code\u003e protocol.\u003c/p\u003e\n"]]],["The GCKMediaInformation class aggregates data about a media item, including its content ID, stream type, and content type. Key actions include initializing with content details like `contentID`, `streamType`, `contentType`, `metadata`, `streamDuration`, `mediaTracks`, `textTrackStyle`, and `customData`. It also supports legacy initialization, excluding media/text tracks. The class facilitates searching for media tracks by ID, and provides properties for ad breaks, ad break clips, stream duration, and custom data.\n"],null,[]]