คลาส GCKMediaControlChannel

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

ภาพรวม

GCKCastChannel คลาสย่อยสำหรับการดำเนินการควบคุมสื่อ

การดำเนินการใดๆ ที่ใช้กับสตรีมที่ใช้งานอยู่ในปัจจุบัน (เล่น หยุดชั่วคราว ค้นหา หยุด ฯลฯ) ต้องมีสถานะสื่อที่ถูกต้อง (นั่นคือไม่ใช่ค่าว่าง) มิฉะนั้นระบบจะแสดงผล kGCKInvalidRequestID และจะไม่ส่งคำขอ ระบบจะขอสถานะสื่อโดยอัตโนมัติเมื่อช่องเชื่อมต่อ โดยจะรวมไว้ในการตอบกลับที่โหลดสำเร็จ และยังอัปเดตได้ทุกเมื่อ นอกจากนี้ สถานะสื่อยังอาจกลายเป็น "ไม่มี" ได้ทุกเมื่อ เช่น หากช่องถูกตัดการเชื่อมต่อชั่วคราว เมื่อใช้ช่องนี้ ควรตรวจสอบการเปลี่ยนแปลงสถานะสื่อผ่านmediaControlChannelDidUpdateStatus: (GCKMediaControlChannelDelegate-p) Callback และควรเรียกใช้เมธอดที่ทำงานกับสตรีมในขณะที่สถานะสื่อไม่ใช่ nil เท่านั้น

หากเริ่มคำขอสำเร็จ เมธอดที่เกี่ยวข้องจะแสดงรหัสคำขอที่กำหนดให้กับคำขอนั้น หากคำขอเริ่มไม่สำเร็จ เมธอดจะแสดงผล kGCKInvalidRequestID และตั้งค่าพร็อพเพอร์ตี้ lastError เพื่อระบุสาเหตุที่ทำให้ไม่สำเร็จ หากเริ่มคำขอสำเร็จแต่สุดท้ายล้มเหลว ระบบจะเรียกใช้mediaControlChannel:requestDidFailWithID:error: (GCKMediaControlChannelDelegate-p)การเรียกกลับเพื่อระบุว่าล้มเหลว

ดูโปรโตคอลการมอบสิทธิ์ได้ที่ GCKMediaControlChannelDelegate

Deprecated:
ใช้พร็อพเพอร์ตี้ GCKRemoteMediaClient ของ GCKCastSession เพื่อควบคุมการเล่นสื่อ

รับค่า GCKCastChannel

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

(instancetype) - init
 ตัวเริ่มต้นที่กำหนด เพิ่มเติม...
 
(NSInteger) - loadMedia:
 โหลดและเริ่มเล่นรายการสื่อใหม่ เพิ่มเติม...
 
(NSInteger) - loadMedia:autoplay:
 โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - loadMedia:autoplay:playPosition:
 โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - loadMedia:autoplay:playPosition:customData:
 โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - loadMedia:autoplay:playPosition:activeTrackIDs:
 โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - loadMedia:autoplay:playPosition:activeTrackIDs:customData:
 โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - setActiveTrackIDs:
 ตั้งค่าแทร็กที่ใช้งานอยู่ เพิ่มเติม...
 
(NSInteger) - setTextTrackStyle:
 ตั้งค่ารูปแบบแทร็กข้อความ เพิ่มเติม...
 
(NSInteger) - pause
 หยุดเล่นรายการสื่อปัจจุบันชั่วคราว เพิ่มเติม...
 
(NSInteger) - pauseWithCustomData:
 หยุดเล่นรายการสื่อปัจจุบันชั่วคราว เพิ่มเติม...
 
(NSInteger) - stop
 หยุดเล่นรายการสื่อปัจจุบัน เพิ่มเติม...
 
(NSInteger) - stopWithCustomData:
 หยุดเล่นรายการสื่อปัจจุบัน เพิ่มเติม...
 
(NSInteger) - play
 เริ่ม (หรือกลับมา) เล่นรายการสื่อปัจจุบัน เพิ่มเติม...
 
(NSInteger) - playWithCustomData:
 เริ่ม (หรือกลับมา) เล่นรายการสื่อปัจจุบัน เพิ่มเติม...
 
(NSInteger) - seekToTimeInterval:
 ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน เพิ่มเติม...
 
(NSInteger) - seekToTimeInterval:resumeState:
 ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน เพิ่มเติม...
 
(NSInteger) - seekToTimeInterval:resumeState:customData:
 ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน เพิ่มเติม...
 
(NSInteger) - queueLoadItems:startIndex:repeatMode:
 โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - queueLoadItems:startIndex:repeatMode:customData:
 โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - queueLoadItems:startIndex:playPosition:repeatMode:customData:
 โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ) เพิ่มเติม...
 
(NSInteger) - queueInsertItems:beforeItemWithID:
 แทรกรายการสื่อใหม่ลงในคิว เพิ่มเติม...
 
(NSInteger) - queueInsertItems:beforeItemWithID:customData:
 แทรกรายการสื่อใหม่ลงในคิว เพิ่มเติม...
 
(NSInteger) - queueInsertItem:beforeItemWithID:
 เมธอดที่สะดวกซึ่งแทรกรายการเดียวลงในคิว เพิ่มเติม...
 
(NSInteger) - queueInsertAndPlayItem:beforeItemWithID:
 เมธอดที่สะดวกซึ่งจะแทรกรายการเดียวลงในคิวและทำให้รายการนั้นเป็นรายการปัจจุบัน เพิ่มเติม...
 
(NSInteger) - queueInsertAndPlayItem:beforeItemWithID:playPosition:customData:
 เมธอดที่สะดวกซึ่งจะแทรกรายการเดียวลงในคิวและทำให้รายการนั้นเป็นรายการปัจจุบัน เพิ่มเติม...
 
(NSInteger) - queueUpdateItems:
 อัปเดตคิว เพิ่มเติม...
 
(NSInteger) - queueUpdateItems:customData:
 อัปเดตคิว เพิ่มเติม...
 
(NSInteger) - queueRemoveItemsWithIDs:
 นำรายการสื่อออกจากคิว เพิ่มเติม...
 
(NSInteger) - queueRemoveItemsWithIDs:customData:
 นำรายการสื่อออกจากคิว เพิ่มเติม...
 
(NSInteger) - queueRemoveItemWithID:
 เมธอดที่สะดวกซึ่งนำรายการเดียวออกจากคิว เพิ่มเติม...
 
(NSInteger) - queueReorderItemsWithIDs:insertBeforeItemWithID:
 จัดเรียงรายการสื่อในคิวใหม่ เพิ่มเติม...
 
(NSInteger) - queueReorderItemsWithIDs:insertBeforeItemWithID:customData:
 จัดเรียงรายการสื่อในคิวใหม่ เพิ่มเติม...
 
(NSInteger) - queueMoveItemWithID:beforeItemWithID:
 วิธีที่สะดวกในการย้ายรายการเดียวในคิว เพิ่มเติม...
 
(NSInteger) - queueJumpToItemWithID:
 ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว เพิ่มเติม...
 
(NSInteger) - queueJumpToItemWithID:customData:
 ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว เพิ่มเติม...
 
(NSInteger) - queueJumpToItemWithID:playPosition:customData:
 ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว เพิ่มเติม...
 
(NSInteger) - queueNextItem
 เลื่อนไปยังรายการถัดไปในคิว เพิ่มเติม...
 
(NSInteger) - queuePreviousItem
 ย้ายไปยังรายการก่อนหน้าในคิว เพิ่มเติม...
 
(NSInteger) - queueSetRepeatMode:
 ตั้งค่าโหมดเล่นซ้ำในคิว เพิ่มเติม...
 
(NSInteger) - setStreamVolume:
 ตั้งค่าระดับเสียงของสตรีม เพิ่มเติม...
 
(NSInteger) - setStreamVolume:customData:
 ตั้งค่าระดับเสียงของสตรีม เพิ่มเติม...
 
(NSInteger) - setStreamMuted:
 ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่ เพิ่มเติม...
 
(NSInteger) - setStreamMuted:customData:
 ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่ เพิ่มเติม...
 
(NSInteger) - requestStatus
 ขอข้อมูลสถานะสื่อที่อัปเดตจากผู้รับ เพิ่มเติม...
 
(NSTimeInterval) - approximateStreamPosition
 แสดงผลตำแหน่งสตรีมโดยประมาณซึ่งคำนวณจากข้อมูลสตรีมที่ได้รับล่าสุดและเวลาจริงที่ผ่านไปนับตั้งแต่การอัปเดตนั้น เพิ่มเติม...
 
(BOOL) - cancelRequestWithID:
 ยกเลิกคำขอที่กำลังดำเนินการ เพิ่มเติม...
 
(instancetype) - initWithNamespace:
 ตัวเริ่มต้นที่กำหนด เพิ่มเติม...
 
(void) - didReceiveTextMessage:
 เรียกใช้เมื่อได้รับข้อความในช่องทางนี้ เพิ่มเติม...
 
(BOOL) - sendTextMessage:
 ส่งข้อความในช่องนี้ เพิ่มเติม...
 
(BOOL) - sendTextMessage:error:
 ส่งข้อความในช่องนี้ เพิ่มเติม...
 
(NSInteger) - generateRequestID
 สร้างรหัสคำขอสำหรับข้อความใหม่ เพิ่มเติม...
 
(NSNumber *__nullable) - generateRequestNumber
 เมธอดอำนวยความสะดวกซึ่งรวมผลลัพธ์ของ generateRequestID ไว้ใน NSNumber เพิ่มเติม...
 
(void) - didConnect
 เรียกใช้เมื่อเชื่อมต่อช่องนี้แล้ว ซึ่งบ่งบอกว่าตอนนี้สามารถแลกเปลี่ยนข้อความกับอุปกรณ์แคสต์ผ่านช่องนี้ได้แล้ว เพิ่มเติม...
 
(void) - didDisconnect
 เรียกใช้เมื่อช่องนี้ถูกตัดการเชื่อมต่อ ซึ่งบ่งบอกว่าไม่สามารถแลกเปลี่ยนข้อความกับอุปกรณ์ Cast ผ่านช่องนี้ได้อีกต่อไป เพิ่มเติม...
 

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

GCKMediaStatusmediaStatus
 สถานะสื่อสำหรับสื่อที่โหลดอยู่ในปัจจุบัน หากมี หรือ nil เพิ่มเติม...
 
NSTimeInterval timeSinceLastMediaStatusUpdate
 ระยะเวลาที่ผ่านไปนับตั้งแต่ได้รับการอัปเดตสถานะสื่อครั้งล่าสุด เพิ่มเติม...
 
GCKErrorlastError
 รายละเอียดข้อผิดพลาดจากคำขอล่าสุด (หากมี) หรือ nil หากคำขอล่าสุดสำเร็จ เพิ่มเติม...
 
id< GCKMediaControlChannelDelegatedelegate
 ผู้รับมอบสิทธิ์สำหรับการรับการแจ้งเตือนเกี่ยวกับการเปลี่ยนแปลงสถานะของช่อง เพิ่มเติม...
 
NSString * protocolNamespace
 เนมสเปซของช่อง เพิ่มเติม...
 
BOOL isConnected
 การแจ้งที่ระบุว่าช่องนี้เชื่อมต่ออยู่หรือไม่ เพิ่มเติม...
 
GCKDeviceManagerdeviceManager
 ผู้จัดการอุปกรณ์ที่ลงทะเบียนช่องนี้ (หากมี) เพิ่มเติม...
 

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

- (instancetype) init

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

ใช้ GCKCastChannel

- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo

โหลดและเริ่มเล่นรายการสื่อใหม่

Parameters
mediaInfoAn object describing the media item to load.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay 

โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition 

โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
customData: (id __nullable)  customData 

โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs 

โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
activeTrackIDsAn array of integers specifying the active tracks. May be nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: (GCKMediaInformation *)  mediaInfo
autoplay: (BOOL)  autoplay
playPosition: (NSTimeInterval)  playPosition
activeTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs
customData: (id __nullable)  customData 

โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)

Parameters
mediaInfoAn object describing the media item to load.
autoplayWhether playback should start immediately.
playPositionThe initial playback position.
activeTrackIDsAn array of integers specifying the active tracks. May be nil.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) setActiveTrackIDs: (NSArray< NSNumber * > *__nullable)  activeTrackIDs

ตั้งค่าแทร็กที่ใช้งานอยู่

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

Parameters
activeTrackIDsAn array of integers specifying the active tracks.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้ อาจเป็น nil หรืออาร์เรย์ว่างเพื่อตั้งค่าแทร็กที่ใช้งานอยู่เป็นรายการว่าง
- (NSInteger) setTextTrackStyle: (GCKMediaTextTrackStyle *__nullable)  textTrackStyle

ตั้งค่ารูปแบบแทร็กข้อความ

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

Parameters
textTrackStyleThe text track style. The style will not be changed if this is nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) pause

หยุดเล่นรายการสื่อปัจจุบันชั่วคราว

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) pauseWithCustomData: (id __nullable)  customData

หยุดเล่นรายการสื่อปัจจุบันชั่วคราว

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) stop

หยุดเล่นรายการสื่อปัจจุบัน

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน หากมีการโหลดคิวอยู่ ระบบจะนำคิวออก

การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) stopWithCustomData: (id __nullable)  customData

หยุดเล่นรายการสื่อปัจจุบัน

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน หากมีการโหลดคิวอยู่ ระบบจะนำคิวออก

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) play

เริ่ม (หรือกลับมา) เล่นรายการสื่อปัจจุบัน

การเล่นจะเริ่มที่จุดเริ่มต้นของสตรีมเสมอ คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) playWithCustomData: (id __nullable)  customData

เริ่ม (หรือกลับมา) เล่นรายการสื่อปัจจุบัน

การเล่นจะเริ่มที่จุดเริ่มต้นของสตรีมเสมอ คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

Parameters
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) seekToTimeInterval: (NSTimeInterval)  position

ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

Parameters
positionThe new position from the beginning of the stream.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaControlChannelResumeState resumeState 

ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

Parameters
positionThe new position interval from the beginning of the stream.
resumeStateThe action to take after the seek operation has finished.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) seekToTimeInterval: (NSTimeInterval)  position
resumeState: (GCKMediaControlChannelResumeState resumeState
customData: (id __nullable)  customData 

ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน

คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน

Parameters
positionThe new position from the beginning of the stream.
resumeStateThe action to take after the seek operation has finished.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: (GCKMediaRepeatMode repeatMode 

โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ)

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
repeatModeThe repeat mode for playing the queue.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (id __nullable)  customData 

โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ)

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
repeatModeThe repeat mode for playing the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueLoadItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
startIndex: (NSUInteger)  startIndex
playPosition: (NSTimeInterval)  playPosition
repeatMode: (GCKMediaRepeatMode repeatMode
customData: (id __nullable)  customData 

โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ)

Parameters
queueItemsAn array of GCKMediaQueueItem instances to load. Must not be nil or empty.
startIndexThe index of the item in the items array that should be played first.
playPositionThe initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
repeatModeThe repeat mode for playing the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueInsertItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
beforeItemWithID: (NSUInteger)  beforeItemID 

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

Parameters
queueItemsAn array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemIDThe ID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID, the inserted list will be appended to the end of the queue.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueInsertItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
beforeItemWithID: (NSUInteger)  beforeItemID
customData: (id __nullable)  customData 

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

Parameters
queueItemsAn array of GCKMediaQueueItem instances to insert. Must not be nil or empty.
beforeItemIDID of the item that will be located immediately after the inserted list. If the value is kGCKMediaQueueInvalidItemID, the inserted list will be appended to the end of the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueInsertItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID 

เมธอดที่สะดวกซึ่งแทรกรายการเดียวลงในคิว

Parameters
itemThe item to insert.
beforeItemIDThe ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueInsertAndPlayItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID 

เมธอดที่สะดวกซึ่งจะแทรกรายการเดียวลงในคิวและทำให้รายการนั้นเป็นรายการปัจจุบัน

Parameters
itemThe item to insert.
beforeItemIDThe ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueInsertAndPlayItem: (GCKMediaQueueItem *)  item
beforeItemWithID: (NSUInteger)  beforeItemID
playPosition: (NSTimeInterval)  playPosition
customData: (id __nullable)  customData 

เมธอดที่สะดวกซึ่งจะแทรกรายการเดียวลงในคิวและทำให้รายการนั้นเป็นรายการปัจจุบัน

Parameters
itemThe item to insert.
beforeItemIDThe ID of the item that will be located immediately after the inserted item. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the inserted item will be appended to the end of the queue.
playPositionThe initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems

อัปเดตคิว

Parameters
queueItemsThe list of updated items.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueUpdateItems: (NSArray< GCKMediaQueueItem * > *)  queueItems
customData: (id __nullable)  customData 

อัปเดตคิว

Parameters
queueItemsThe list of updated items.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs

นำรายการสื่อออกจากคิว

หากคิวว่างเปล่า เซสชันสื่อปัจจุบันจะสิ้นสุดลง

Parameters
itemIDsAn array of media item IDs identifying the items to remove. Must not be nil or empty.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueRemoveItemsWithIDs: (NSArray< NSNumber * > *)  itemIDs
customData: (id __nullable)  customData 

นำรายการสื่อออกจากคิว

หากคิวว่างเปล่า เซสชันสื่อปัจจุบันจะสิ้นสุดลง

Parameters
itemIDsAn array of media item IDs identifying the items to remove. Must not be nil or empty.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueRemoveItemWithID: (NSUInteger)  itemID

เมธอดที่สะดวกซึ่งนำรายการเดียวออกจากคิว

Parameters
itemIDThe ID of the item to remove.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID 

จัดเรียงรายการสื่อในคิวใหม่

Parameters
queueItemIDsAn array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemIDID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the reordered list will be appended at the end of the queue.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueReorderItemsWithIDs: (NSArray< NSNumber * > *)  queueItemIDs
insertBeforeItemWithID: (NSUInteger)  beforeItemID
customData: (id __nullable)  customData 

จัดเรียงรายการสื่อในคิวใหม่

Parameters
queueItemIDsAn array of media item IDs identifying the items to reorder. Must not be nil or empty.
beforeItemIDThe ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the reordered list will be moved to the end of the queue.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueMoveItemWithID: (NSUInteger)  itemID
beforeItemWithID: (NSUInteger)  beforeItemID 

วิธีที่สะดวกในการย้ายรายการเดียวในคิว

Parameters
itemIDThe ID of the item to move.
beforeItemIDThe ID of the item that will be located immediately after the reordered list. If the value is kGCKMediaQueueInvalidItemID, or does not refer to any item currently in the queue, the item will be moved to the end of the queue.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueJumpToItemWithID: (NSUInteger)  itemID

ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว

Parameters
itemIDThe ID of the item to jump to.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) queueJumpToItemWithID: (NSUInteger)  itemID
customData: (id __nullable)  customData 

ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว

Parameters
itemIDThe ID of the item to jump to.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) queueJumpToItemWithID: (NSUInteger)  itemID
playPosition: (NSTimeInterval)  playPosition
customData: (id __nullable)  customData 

ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว

Parameters
itemIDThe ID of the item to jump to.
playPositionThe initial playback position for the item when it is first played, relative to the beginning of the stream. This value is ignored when the same item is played again, for example when the queue repeats, or the item is later jumped to. In those cases the item's startTime is used.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) queueNextItem

เลื่อนไปยังรายการถัดไปในคิว

การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) queuePreviousItem

ย้ายไปยังรายการก่อนหน้าในคิว

การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) queueSetRepeatMode: (GCKMediaRepeatMode repeatMode

ตั้งค่าโหมดเล่นซ้ำในคิว

Parameters
repeatModeThe new repeat mode.
การคืนสินค้า
รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) setStreamVolume: (float)  volume

ตั้งค่าระดับเสียงของสตรีม

คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน

Parameters
volumeThe new volume, in the range [0.0 - 1.0].
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) setStreamVolume: (float)  volume
customData: (id __nullable)  customData 

ตั้งค่าระดับเสียงของสตรีม

คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน

Parameters
volumeThe new volume, in the range [0.0 - 1.0].
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) setStreamMuted: (BOOL)  muted

ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่

คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน

Parameters
mutedWhether the stream should be muted or unmuted.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) setStreamMuted: (BOOL)  muted
customData: (id __nullable)  customData 

ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่

คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน

Parameters
mutedWhether the stream should be muted or unmuted.
customDataCustom application-specific data to pass along with the request. Must either be an object that can be serialized to JSON using NSJSONSerialization, or nil.
การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) requestStatus

ขอข้อมูลสถานะสื่อที่อัปเดตจากผู้รับ

การคืนสินค้า
รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSTimeInterval) approximateStreamPosition

แสดงผลตำแหน่งสตรีมโดยประมาณซึ่งคำนวณจากข้อมูลสตรีมที่ได้รับล่าสุดและเวลาจริงที่ผ่านไปนับตั้งแต่การอัปเดตนั้น

แสดงผล 0 หากไม่ได้เชื่อมต่อช่องหรือหากไม่มีการโหลดสื่อในขณะนี้

- (BOOL) cancelRequestWithID: (NSInteger)  requestID

ยกเลิกคำขอที่กำลังดำเนินการ

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

Parameters
requestIDThe ID of the request to cancel.
การคืนสินค้า
YES หากคำขอถูกยกเลิก หรือ NO หากไม่มีคำขอที่ติดตามด้วยรหัสที่ระบุ
- (instancetype) initWithNamespace: (NSString *)  protocolNamespace

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

สร้าง GCKCastChannel ใหม่ด้วยเนมสเปซที่ระบุ

Parameters
protocolNamespaceThe namespace.

ใช้งานใน GCKGenericChannel

- (void) didReceiveTextMessage: (NSString *)  message

เรียกใช้เมื่อได้รับข้อความในช่องทางนี้

การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ

Parameters
messageThe message.
- (BOOL) sendTextMessage: (NSString *)  message

ส่งข้อความในช่องนี้

Parameters
messageThe message.
การคืนสินค้า
YES เมื่อสำเร็จ หรือ NO หากส่งข้อความไม่ได้ (เนื่องจากไม่ได้เชื่อมต่อช่อง หรือเนื่องจากบัฟเฟอร์การส่งเต็มเกินไปในขณะนี้)
Deprecated:
ใช้ sendTextMessage:error: ซึ่งให้ข้อมูลข้อผิดพลาดโดยละเอียด
- (BOOL) sendTextMessage: (NSString *)  message
error: (GCKError *__nullable *__nullable)  error 

ส่งข้อความในช่องนี้

Parameters
messageThe message.
errorA pointer at which to store the error result. May be nil.
การคืนสินค้า
YES หากสำเร็จ หรือ NO หากส่งข้อความไม่ได้
- (NSInteger) generateRequestID

สร้างรหัสคำขอสำหรับข้อความใหม่

การคืนสินค้า
รหัสที่สร้างขึ้น หรือ kGCKInvalidRequestID หากช่องไม่ได้เชื่อมต่ออยู่ในขณะนี้
- (NSNumber * __nullable) generateRequestNumber

เมธอดอำนวยความสะดวกซึ่งรวมผลลัพธ์ของ generateRequestID ไว้ใน NSNumber

การคืนสินค้า
รหัสที่สร้างขึ้น หรือ nil หากช่องไม่ได้เชื่อมต่ออยู่ในขณะนี้
- (void) didConnect

เรียกใช้เมื่อเชื่อมต่อช่องนี้แล้ว ซึ่งบ่งบอกว่าตอนนี้สามารถแลกเปลี่ยนข้อความกับอุปกรณ์แคสต์ผ่านช่องนี้ได้แล้ว

การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ

- (void) didDisconnect

เรียกใช้เมื่อช่องนี้ถูกตัดการเชื่อมต่อ ซึ่งบ่งบอกว่าไม่สามารถแลกเปลี่ยนข้อความกับอุปกรณ์ Cast ผ่านช่องนี้ได้อีกต่อไป

การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ

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

- (GCKMediaStatus*) mediaStatus
readnonatomicstrong

สถานะสื่อสำหรับสื่อที่โหลดอยู่ในปัจจุบัน หากมี หรือ nil

- (NSTimeInterval) timeSinceLastMediaStatusUpdate
readnonatomicassign

ระยะเวลาที่ผ่านไปนับตั้งแต่ได้รับการอัปเดตสถานะสื่อครั้งล่าสุด

หากคำขอสถานะอยู่ระหว่างดำเนินการ ค่านี้จะเป็น 0

- (GCKError*) lastError
readnonatomiccopy

รายละเอียดข้อผิดพลาดจากคำขอล่าสุด (หากมี) หรือ nil หากคำขอล่าสุดสำเร็จ

- (id<GCKMediaControlChannelDelegate>) delegate
readwritenonatomicweak

ผู้รับมอบสิทธิ์สำหรับการรับการแจ้งเตือนเกี่ยวกับการเปลี่ยนแปลงสถานะของช่อง

- (NSString*) protocolNamespace
readnonatomiccopyinherited

เนมสเปซของช่อง

- (BOOL) isConnected
readnonatomicassigninherited

การแจ้งที่ระบุว่าช่องนี้เชื่อมต่ออยู่หรือไม่

- (GCKDeviceManager*) deviceManager
readnonatomicweakinherited

ผู้จัดการอุปกรณ์ที่ลงทะเบียนช่องนี้ (หากมี)

Deprecated:
หากช่องนี้ไม่ได้ลงทะเบียนกับคลาส GCKDeviceManager ที่เลิกใช้งานแล้ว ค่านี้จะเป็น nil