คลาส GCKMediaQueueItem

การอ้างอิงคลาส GCKMediaQueueItem

ภาพรวม

คลาสที่แสดงรายการในคิวสื่อ

อินสแตนซ์ของออบเจ็กต์นี้เปลี่ยนแปลงไม่ได้

คลาสนี้ใช้ในการสื่อสารแบบสองทางระหว่างแอปพลิเคชันผู้ส่งและแอปพลิเคชันผู้รับ ผู้ส่งจะสร้างรายการเหล่านี้เพื่อโหลดหรือแทรกรายการสื่อในแอปพลิเคชันตัวรับ GCKMediaStatus จากผู้รับยังมีรายการไอเทมที่แสดงเป็นอินสแตนซ์ของคลาสนี้ด้วย

เมื่อโหลดแล้ว ตัวรับจะกำหนดรหัสรายการที่ไม่ซ้ำกันให้กับแต่ละ GCKMediaQueueItem แม้ว่าจะมีการโหลดสื่อเดียวกันหลายครั้งก็ตาม

รับค่า NSObject ใช้ <NSCopying>

สรุปวิธีการของอินสแตนซ์

(instancetype) - initWithMediaInformation:autoplay:startTime:preloadTime:activeTrackIDs:customData:
 สร้าง GCKMediaQueueItem ใหม่ด้วยแอตทริบิวต์ที่ระบุ เพิ่มเติม...
 
(instancetype) - initWithMediaInformation:autoplay:startTime:playbackDuration:preloadTime:activeTrackIDs:customData:
 ตัวเริ่มต้นที่กำหนด เพิ่มเติม...
 
(void) - clearItemID
 ล้าง (ยกเลิกการกำหนด) รหัสสินค้า เพิ่มเติม...
 
(instancetype) - mediaQueueItemModifiedWithBlock:
 แสดงผลสำเนาของ GCKMediaQueueItem นี้ซึ่งได้รับการแก้ไขโดยบล็อกที่ระบุ เพิ่มเติม...
 

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

GCKMediaInformationmediaInformation
 ข้อมูลสื่อที่เชื่อมโยงกับรายการนี้ เพิ่มเติม...
 
NSUInteger itemID
 รหัสสินค้า หรือ kGCKMediaQueueInvalidItemID หากยังไม่ได้กำหนด เพิ่มเติม...
 
BOOL autoplay
 เลือกว่ารายการควรเริ่มเล่นโดยอัตโนมัติเมื่อกลายเป็นรายการปัจจุบันในคิวหรือไม่ เพิ่มเติม...
 
NSTimeInterval startTime
 เวลาเริ่มต้นของรายการเป็นวินาที เพิ่มเติม...
 
NSTimeInterval playbackDuration
 ระยะเวลาการเล่นของรายการเป็นวินาที หรือ INFINITY หากควรใช้ระยะเวลาจริงของสตรีม เพิ่มเติม...
 
NSTimeInterval preloadTime
 ระยะเวลาก่อนที่รายการก่อนหน้าจะสิ้นสุดลงในหน่วยวินาทีก่อนที่ตัวรับควรเริ่มโหลดรายการนี้ล่วงหน้า เพิ่มเติม...
 
NSArray< NSNumber * > * activeTrackIDs
 รหัสแทร็กที่ใช้งานอยู่สำหรับรายการนี้ เพิ่มเติม...
 
id customData
 ข้อมูลที่กำหนดเองที่เชื่อมโยงกับรายการนี้ หากมี เพิ่มเติม...
 

รายละเอียดวิธีการ

- (instancetype) initWithMediaInformation: (GCKMediaInformation *)  mediaInformation
autoplay: (BOOL)  autoplay
startTime: (NSTimeInterval)  startTime
preloadTime: (NSTimeInterval)  preloadTime
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

สร้าง GCKMediaQueueItem ใหม่ด้วยแอตทริบิวต์ที่ระบุ

ดูข้อมูลเพิ่มเติมได้ในเอกสารประกอบของพร็อพเพอร์ตี้ที่เกี่ยวข้อง

Parameters
mediaInformationThe media information for the item.
autoplayThe autoplay state for this item.
startTimeThe start time of the item, in seconds. May be kGCKInvalidTimeInterval if this item refers to a live stream or if the default start time should be used.
preloadTimeThe preload time for the item, in seconds. May be kGCKInvalidTimeInterval to indicate no preload time.
activeTrackIDsThe active track IDs for the item. May be nil.
customDataAny custom data to associate with the item. May be nil.
- (instancetype) initWithMediaInformation: (GCKMediaInformation *)  mediaInformation
autoplay: (BOOL)  autoplay
startTime: (NSTimeInterval)  startTime
playbackDuration: (NSTimeInterval)  playbackDuration
preloadTime: (NSTimeInterval)  preloadTime
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

ตัวเริ่มต้นที่กำหนด

สร้าง GCKMediaQueueItem ใหม่ด้วยแอตทริบิวต์ที่ระบุ ดูข้อมูลเพิ่มเติมได้ในเอกสารประกอบของพร็อพเพอร์ตี้ที่เกี่ยวข้อง

Parameters
mediaInformationThe media information for the item.
autoplayThe autoplay state for this item.
startTimeThe start time of the item, in seconds. May be kGCKInvalidTimeInterval if this item refers to a live stream or if the default start time should be used.
playbackDurationThe playback duration of the item, in seconds. May be kGCKInvalidTimeInterval to indicate no preload time.
preloadTimeThe preload time for the item, in seconds.
activeTrackIDsThe active track IDs for the item. May be nil.
customDataAny custom data to associate with the item. May be nil.
- (void) clearItemID

ล้าง (ยกเลิกการกำหนด) รหัสสินค้า

ควรเรียกใช้เพื่อนำอินสแตนซ์ที่มีอยู่กลับมาใช้ซ้ำ เช่น เพื่อเพิ่มอินสแตนซ์กลับไปในคิว

- (instancetype) mediaQueueItemModifiedWithBlock: (void(^)(GCKMediaQueueItemBuilder *builder))  block

แสดงผลสำเนาของ GCKMediaQueueItem นี้ซึ่งได้รับการแก้ไขโดยบล็อกที่ระบุ

Parameters
blockA block that receives a GCKMediaQueueItemBuilder which can be used to modify attributes of the copy. It is not necessary to call the builder's build (GCKMediaQueueItemBuilder) method within the block, as this method will do that automatically when the block completes.
การคืนสินค้า
สำเนาที่แก้ไขแล้วของรายการนี้

รายละเอียดพร็อพเพอร์ตี้

- (GCKMediaInformation*) mediaInformation
readnonatomicstrong

ข้อมูลสื่อที่เชื่อมโยงกับรายการนี้

- (NSUInteger) itemID
readnonatomicassign

รหัสสินค้า หรือ kGCKMediaQueueInvalidItemID หากยังไม่ได้กำหนด

- (BOOL) autoplay
readnonatomicassign

เลือกว่ารายการควรเริ่มเล่นโดยอัตโนมัติเมื่อกลายเป็นรายการปัจจุบันในคิวหรือไม่

หาก NO คิวจะหยุดชั่วคราวเมื่อถึงรายการนี้ ค่าเริ่มต้นคือ YES

- (NSTimeInterval) startTime
readnonatomicassign

เวลาเริ่มต้นของรายการเป็นวินาที

ค่าเริ่มต้นคือ kGCKInvalidTimeInterval ซึ่งหมายความว่ายังไม่ได้ตั้งเวลาเริ่มต้น

- (NSTimeInterval) playbackDuration
readnonatomicassign

ระยะเวลาการเล่นของรายการเป็นวินาที หรือ INFINITY หากควรใช้ระยะเวลาจริงของสตรีม

- (NSTimeInterval) preloadTime
readnonatomicassign

ระยะเวลาก่อนที่รายการก่อนหน้าจะสิ้นสุดลงในหน่วยวินาทีก่อนที่ตัวรับควรเริ่มโหลดรายการนี้ล่วงหน้า

ค่าเริ่มต้นคือ kGCKInvalidTimeInterval ซึ่งบ่งบอกว่าไม่ได้ตั้งเวลาโหลดล่วงหน้า

- (NSArray<NSNumber *>*) activeTrackIDs
readnonatomicstrong

รหัสแทร็กที่ใช้งานอยู่สำหรับรายการนี้

- (id) customData
readnonatomicstrong

ข้อมูลที่กำหนดเองที่เชื่อมโยงกับรายการนี้ หากมี