คลาส GCKMediaInformationBuilder

ข้อมูลอ้างอิงคลาส GCKMediaInformationBuilder

ภาพรวม

ออบเจ็กต์เครื่องมือสร้างสําหรับสร้างอินสแตนซ์ GCKMediaInformation ใหม่หรือที่ดึงมา

เครื่องมือสร้างอาจใช้ในการดึง GCKMediaInformation จากที่มีอยู่:

GCKMediaInformationBuilder *เครื่องมือสร้าง =
[[GCKMediaInformationBuilder alloc] initWithMediaInformation:originalMediaInfo];
Builder.contentID = ...; // เปลี่ยน Content ID
Builder.streamDuration = 100; // เปลี่ยนระยะเวลาของสตรีม
GCKMediaInformation *derivedMediaInfo = [build] ของเครื่องมือสร้าง

นอกจากนี้ยังใช้สร้าง GCKMediaInformation ใหม่ตั้งแต่ต้นได้ด้วย

GCKMediaInformationBuilder *เครื่องมือสร้าง =
[[GCKMediaInformationBuilder alloc] initWithContentURL:...];
Builder.contentType = ...;
เครื่องมือสร้าง.streamType = ...;
Builder.metadata = ...;
// ตั้งค่าพร็อพเพอร์ตี้อื่นๆ ที่ต้องการทั้งหมด...
GCKMediaInformation *newMediaInfo = [build build];
Since
4.0

รับค่า NSObject

สรุปเมธอดของอินสแตนซ์

(instancetype) - initWithContentURL:
 สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น เพิ่มเติม...
 
(instancetype) - initWithEntity:
 สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น เพิ่มเติม...
 
(instancetype) - initWithMediaInformation:
 สร้าง GCKMediaInformationBuilder ใหม่ที่มีแอตทริบิวต์ที่คัดลอกจากอินสแตนซ์ GCKMediaInformation ที่ระบุ เพิ่มเติม...
 
(instancetype) - initWithContentID:
 สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น เพิ่มเติม...
 
(instancetype) - initWithContentID:entity:
 สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น เพิ่มเติม...
 
(GCKMediaInformation *) - build
 สร้าง GCKMediaInformation โดยใช้แอตทริบิวต์ปัจจุบันของเครื่องมือสร้าง เพิ่มเติม...
 

สรุปพร็อพเพอร์ตี้

NSString * contentID
 รหัสเนื้อหาสำหรับสตรีมนี้ เพิ่มเติม...
 
NSURL * contentURL
 URL ของเนื้อหาที่จะเล่น เพิ่มเติม...
 
GCKMediaStreamType streamType
 ประเภทสตรีม เพิ่มเติม...
 
NSString * contentType
 ประเภทเนื้อหา (MIME) เพิ่มเติม...
 
GCKMediaMetadata * metadata
 ข้อมูลเมตาของรายการสื่อ เพิ่มเติม...
 
NSArray< GCKAdBreakInfo * > * adBreaks
 รายการช่วงพักโฆษณาในเนื้อหานี้ เพิ่มเติม...
 
NSArray< GCKAdBreakClipInfo * > * adBreakClips
 รายการคลิปช่วงพักโฆษณาในเนื้อหานี้ เพิ่มเติม...
 
NSTimeInterval streamDuration
 ความยาวของสตรีมเป็นวินาที หรือ INFINITY หากเป็นสตรีมแบบสด เพิ่มเติม...
 
NSArray< GCKMediaTrack * > * mediaTracks
 แทร็กสื่อสำหรับสตรีมนี้ เพิ่มเติม...
 
GCKMediaTextTrackStyle * textTrackStyle
 รูปแบบแทร็กข้อความสำหรับสตรีมนี้ เพิ่มเติม...
 
NSString * entity
 Deep Link ของสื่อที่ Google Assistant ใช้ (หากมี) เพิ่มเติม...
 
GCKVASTAdsRequest * VMAP
 การกำหนดค่าคำขอ VMAP หากมี เพิ่มเติม...
 
NSTimeInterval startAbsoluteTime
 เวลาเริ่มต้นของสตรีมในหน่วยวินาทีในเวลา Epoch หรือ kGCKInvalidTimeInterval หากไม่พร้อมใช้งาน เพิ่มเติม...
 
GCKHLSSegmentFormat hlsSegmentFormat
 รูปแบบของกลุ่มเสียง HLS เพิ่มเติม...
 
GCKHLSVideoSegmentFormat hlsVideoSegmentFormat
 รูปแบบของกลุ่มวิดีโอ HLS เพิ่มเติม...
 
id customData
 ข้อมูลที่กำหนดเอง (หากมี) เพิ่มเติม...
 

รายละเอียดของเมธอด

- (instancetype) initWithContentURL: (NSURL *)  contentURL

สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น

Parameters
contentURLThe URL of the content to be played.
Since
4.3.4
- (instancetype) initWithEntity: (NSString *)  entity

สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น

- (instancetype) initWithMediaInformation: (GCKMediaInformation *)  mediaInfo

สร้าง GCKMediaInformationBuilder ใหม่ที่มีแอตทริบิวต์ที่คัดลอกจากอินสแตนซ์ GCKMediaInformation ที่ระบุ

Parameters
mediaInfoThe instance to copy.
- (instancetype) initWithContentID: (NSString *)  contentID

สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น

Deprecated:
ใช้ initWithContentURL: หรือ initWithEntity: แทน
- (instancetype) initWithContentID: (NSString *)  contentID
entity: (NSString *)  entity 

สร้าง GCKMediaInformationBuilder ใหม่ด้วยแอตทริบิวต์ที่ต้องระบุ และแอตทริบิวต์อื่นๆ ทั้งหมดเริ่มต้นด้วยค่าเริ่มต้น

Deprecated:
ใช้ initWithContentURL: หรือ initWithEntity: แทน
- (GCKMediaInformation *) build

สร้าง GCKMediaInformation โดยใช้แอตทริบิวต์ปัจจุบันของเครื่องมือสร้าง

การคืนสินค้า
อินสแตนซ์ GCKMediaInformation ใหม่

รายละเอียดที่พัก

- (NSString*) contentID
readwritenonatomiccopy

รหัสเนื้อหาสำหรับสตรีมนี้

Deprecated:
ใช้ contentURL และเอนทิตีแทน
- (NSURL*) contentURL
readwritenonatomiccopy

URL ของเนื้อหาที่จะเล่น

Since
4.3.4
- (GCKMediaStreamType) streamType
readwritenonatomicassign

ประเภทสตรีม

ค่าเริ่มต้นจะเป็น GCKMediaStreamTypeBuffered

- (NSString*) contentType
readwritenonatomiccopy

ประเภทเนื้อหา (MIME)

- (GCKMediaMetadata*) metadata
readwritenonatomicassign

ข้อมูลเมตาของรายการสื่อ

- (NSArray<GCKAdBreakInfo *>*) adBreaks
readwritenonatomiccopy

รายการช่วงพักโฆษณาในเนื้อหานี้

- (NSArray<GCKAdBreakClipInfo *>*) adBreakClips
readwritenonatomiccopy

รายการคลิปช่วงพักโฆษณาในเนื้อหานี้

- (NSTimeInterval) streamDuration
readwritenonatomicassign

ความยาวของสตรีมเป็นวินาที หรือ INFINITY หากเป็นสตรีมแบบสด

ค่าเริ่มต้นคือ 0

- (NSArray<GCKMediaTrack *>*) mediaTracks
readwritenonatomiccopy

แทร็กสื่อสำหรับสตรีมนี้

- (GCKMediaTextTrackStyle*) textTrackStyle
readwritenonatomiccopy

รูปแบบแทร็กข้อความสำหรับสตรีมนี้

- (NSString*) entity
readwritenonatomiccopy

Deep Link ของสื่อที่ Google Assistant ใช้ (หากมี)

- (GCKVASTAdsRequest*) VMAP
readwritenonatomicassign

การกำหนดค่าคำขอ VMAP หากมี

ดูเพิ่มเติมที่นี่: เทมเพลตการแสดงโฆษณาวิดีโอดิจิทัล 4.0 หากไม่ใช่ nil ระบบจะไม่สนใจช่องอื่นๆ ที่เกี่ยวข้องกับโฆษณาอื่นๆ ทั้งหมด

Since
4.3.4
- (NSTimeInterval) startAbsoluteTime
readwritenonatomicassign

เวลาเริ่มต้นของสตรีมในหน่วยวินาทีในเวลา Epoch หรือ kGCKInvalidTimeInterval หากไม่พร้อมใช้งาน

ค่าเริ่มต้นคือ kGCKInvalidTimeInterval

Since
4.4.1
- (GCKHLSSegmentFormat) hlsSegmentFormat
readwritenonatomicassign

รูปแบบของกลุ่มเสียง HLS

Since
4.6.0
- (GCKHLSVideoSegmentFormat) hlsVideoSegmentFormat
readwritenonatomicassign

รูปแบบของกลุ่มวิดีโอ HLS

Since
4.6.0
- (id) customData
readwritenonatomicassign

ข้อมูลที่กำหนดเอง (หากมี)