ภาพรวม
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 ผ่านช่องนี้ได้อีกต่อไป เพิ่มเติม... | |
สรุปพร็อพเพอร์ตี้ | |
GCKMediaStatus * | mediaStatus |
สถานะสื่อสำหรับสื่อที่โหลดอยู่ในปัจจุบัน หากมี หรือ nil เพิ่มเติม... | |
NSTimeInterval | timeSinceLastMediaStatusUpdate |
ระยะเวลาที่ผ่านไปนับตั้งแต่ได้รับการอัปเดตสถานะสื่อครั้งล่าสุด เพิ่มเติม... | |
GCKError * | lastError |
รายละเอียดข้อผิดพลาดจากคำขอล่าสุด (หากมี) หรือ nil หากคำขอล่าสุดสำเร็จ เพิ่มเติม... | |
id< GCKMediaControlChannelDelegate > | delegate |
ผู้รับมอบสิทธิ์สำหรับการรับการแจ้งเตือนเกี่ยวกับการเปลี่ยนแปลงสถานะของช่อง เพิ่มเติม... | |
NSString * | protocolNamespace |
เนมสเปซของช่อง เพิ่มเติม... | |
BOOL | isConnected |
การแจ้งที่ระบุว่าช่องนี้เชื่อมต่ออยู่หรือไม่ เพิ่มเติม... | |
GCKDeviceManager * | deviceManager |
ผู้จัดการอุปกรณ์ที่ลงทะเบียนช่องนี้ (หากมี) เพิ่มเติม... | |
รายละเอียดวิธีการ
- (instancetype) init |
ตัวเริ่มต้นที่กำหนด
ใช้ GCKCastChannel
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo |
โหลดและเริ่มเล่นรายการสื่อใหม่
- Parameters
-
mediaInfo An object describing the media item to load.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
playPosition: | (NSTimeInterval) | playPosition | |
customData: | (id __nullable) | customData | |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position. customData Custom 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
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position. activeTrackIDs An 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
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately. playPosition The initial playback position. activeTrackIDs An array of integers specifying the active tracks. May be nil
.customData Custom 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
-
activeTrackIDs An array of integers specifying the active tracks.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้ อาจเป็น
nil
หรืออาร์เรย์ว่างเพื่อตั้งค่าแทร็กที่ใช้งานอยู่เป็นรายการว่าง
- (NSInteger) setTextTrackStyle: | (GCKMediaTextTrackStyle *__nullable) | textTrackStyle |
ตั้งค่ารูปแบบแทร็กข้อความ
คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
textTrackStyle The text track style. The style will not be changed if this is nil
.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) pause |
หยุดเล่นรายการสื่อปัจจุบันชั่วคราว
คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) pauseWithCustomData: | (id __nullable) | customData |
หยุดเล่นรายการสื่อปัจจุบันชั่วคราว
คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
customData Custom 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
-
customData Custom 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
-
customData Custom 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
-
position The new position from the beginning of the stream.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaControlChannelResumeState) | resumeState | |
ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน
คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
position The new position interval from the beginning of the stream. resumeState The action to take after the seek operation has finished.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaControlChannelResumeState) | resumeState | |
customData: | (id __nullable) | customData | |
ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน
คำขอจะไม่สำเร็จหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
position The new position from the beginning of the stream. resumeState The action to take after the seek operation has finished. customData Custom 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
-
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil
or empty.startIndex The index of the item in the items array that should be played first. repeatMode The repeat mode for playing the queue.
- การคืนสินค้า
- รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueLoadItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
startIndex: | (NSUInteger) | startIndex | |
repeatMode: | (GCKMediaRepeatMode) | repeatMode | |
customData: | (id __nullable) | customData | |
โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ)
- Parameters
-
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil
or empty.startIndex The index of the item in the items array that should be played first. repeatMode The repeat mode for playing the queue. customData Custom 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
-
queueItems An array of GCKMediaQueueItem instances to load. Must not be nil
or empty.startIndex The index of the item in the items array that should be played first. playPosition The 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. repeatMode The repeat mode for playing the queue. customData Custom 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
-
queueItems An array of GCKMediaQueueItem instances to insert. Must not be nil
or empty.beforeItemID The 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
-
queueItems An array of GCKMediaQueueItem instances to insert. Must not be nil
or empty.beforeItemID 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. customData Custom 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
-
item The item to insert. beforeItemID The 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
-
item The item to insert. beforeItemID The 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
-
item The item to insert. beforeItemID The 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. playPosition The 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. customData Custom 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
-
queueItems The list of updated items.
- การคืนสินค้า
- รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueUpdateItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems | |
customData: | (id __nullable) | customData | |
อัปเดตคิว
- Parameters
-
queueItems The list of updated items. customData Custom 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
-
itemIDs An 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
-
itemIDs An array of media item IDs identifying the items to remove. Must not be nil
or empty.customData Custom 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
-
itemID The ID of the item to remove.
- การคืนสินค้า
- รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueReorderItemsWithIDs: | (NSArray< NSNumber * > *) | queueItemIDs | |
insertBeforeItemWithID: | (NSUInteger) | beforeItemID | |
จัดเรียงรายการสื่อในคิวใหม่
- Parameters
-
queueItemIDs An array of media item IDs identifying the items to reorder. Must not be nil
or empty.beforeItemID 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 appended at the end of the queue.
- การคืนสินค้า
- รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) queueReorderItemsWithIDs: | (NSArray< NSNumber * > *) | queueItemIDs | |
insertBeforeItemWithID: | (NSUInteger) | beforeItemID | |
customData: | (id __nullable) | customData | |
จัดเรียงรายการสื่อในคิวใหม่
- Parameters
-
queueItemIDs An array of media item IDs identifying the items to reorder. Must not be nil
or empty.beforeItemID The 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. customData Custom 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
-
itemID The ID of the item to move. beforeItemID The 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
-
itemID The ID of the item to jump to.
- การคืนสินค้า
- รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) queueJumpToItemWithID: | (NSUInteger) | itemID | |
customData: | (id __nullable) | customData | |
ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว
- Parameters
-
itemID The ID of the item to jump to. customData Custom 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
-
itemID The ID of the item to jump to. playPosition The 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. customData Custom 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
-
repeatMode The new repeat mode.
- การคืนสินค้า
- รหัสคำขอสำหรับคำขอนี้ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้หรือหากพารามิเตอร์ใดไม่ถูกต้อง
- (NSInteger) setStreamVolume: | (float) | volume |
ตั้งค่าระดับเสียงของสตรีม
คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน
- Parameters
-
volume The new volume, in the range [0.0 - 1.0].
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) setStreamVolume: | (float) | volume | |
customData: | (id __nullable) | customData | |
ตั้งค่าระดับเสียงของสตรีม
คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน
- Parameters
-
volume The new volume, in the range [0.0 - 1.0]. customData Custom 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
-
muted Whether the stream should be muted or unmuted.
- การคืนสินค้า
- รหัสคำขอ หรือ kGCKInvalidRequestID หากส่งข้อความไม่ได้
- (NSInteger) setStreamMuted: | (BOOL) | muted | |
customData: | (id __nullable) | customData | |
ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่
คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน
- Parameters
-
muted Whether the stream should be muted or unmuted. customData Custom 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
-
requestID The ID of the request to cancel.
- การคืนสินค้า
YES
หากคำขอถูกยกเลิก หรือNO
หากไม่มีคำขอที่ติดตามด้วยรหัสที่ระบุ
- (instancetype) initWithNamespace: | (NSString *) | protocolNamespace |
ตัวเริ่มต้นที่กำหนด
สร้าง GCKCastChannel ใหม่ด้วยเนมสเปซที่ระบุ
- Parameters
-
protocolNamespace The namespace.
ใช้งานใน GCKGenericChannel
- (void) didReceiveTextMessage: | (NSString *) | message |
เรียกใช้เมื่อได้รับข้อความในช่องทางนี้
การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ
- Parameters
-
message The message.
- (BOOL) sendTextMessage: | (NSString *) | message |
ส่งข้อความในช่องนี้
- Parameters
-
message The message.
- การคืนสินค้า
YES
เมื่อสำเร็จ หรือNO
หากส่งข้อความไม่ได้ (เนื่องจากไม่ได้เชื่อมต่อช่อง หรือเนื่องจากบัฟเฟอร์การส่งเต็มเกินไปในขณะนี้)
- Deprecated:
- ใช้ sendTextMessage:error: ซึ่งให้ข้อมูลข้อผิดพลาดโดยละเอียด
- (BOOL) sendTextMessage: | (NSString *) | message | |
error: | (GCKError *__nullable *__nullable) | error | |
ส่งข้อความในช่องนี้
- Parameters
-
message The message. error A 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 ผ่านช่องนี้ได้อีกต่อไป
การติดตั้งใช้งานเริ่มต้นจะไม่มีการดำเนินการ
รายละเอียดพร็อพเพอร์ตี้
|
readnonatomicstrong |
สถานะสื่อสำหรับสื่อที่โหลดอยู่ในปัจจุบัน หากมี หรือ nil
|
readnonatomicassign |
ระยะเวลาที่ผ่านไปนับตั้งแต่ได้รับการอัปเดตสถานะสื่อครั้งล่าสุด
หากคำขอสถานะอยู่ระหว่างดำเนินการ ค่านี้จะเป็น 0
|
readnonatomiccopy |
รายละเอียดข้อผิดพลาดจากคำขอล่าสุด (หากมี) หรือ nil
หากคำขอล่าสุดสำเร็จ
|
readwritenonatomicweak |
ผู้รับมอบสิทธิ์สำหรับการรับการแจ้งเตือนเกี่ยวกับการเปลี่ยนแปลงสถานะของช่อง
|
readnonatomiccopyinherited |
เนมสเปซของช่อง
|
readnonatomicassigninherited |
การแจ้งที่ระบุว่าช่องนี้เชื่อมต่ออยู่หรือไม่
|
readnonatomicweakinherited |
ผู้จัดการอุปกรณ์ที่ลงทะเบียนช่องนี้ (หากมี)
- Deprecated:
- หากช่องนี้ไม่ได้ลงทะเบียนกับคลาส GCKDeviceManager ที่เลิกใช้งานแล้ว ค่านี้จะเป็น
nil