ภาพรวม
คลาสสำหรับควบคุมการเล่นสื่อในตัวรับสัญญาณ Cast
คลาสนี้มีฟังก์ชันการทำงานเหมือนกับ GCKMediaControlChannel ที่เลิกใช้งานแล้ว ซึ่งคลาสนี้จะห่อหุ้มไว้ แต่มี API ที่สะดวกกว่า ความแตกต่างหลักๆ มีดังนี้
- คำขอแต่ละรายการจะแสดงด้วยออบเจ็กต์ GCKRequest ซึ่งติดตามได้ด้วยผู้มอบสิทธิ์เฉพาะ
- GCKRemoteMediaClient รองรับผู้ฟังหลายคนแทนที่จะเป็นผู้มอบสิทธิ์เพียงคนเดียว
- Since
- 3.0
รับค่า NSObject
สรุปวิธีการของอินสแตนซ์ | |
(void) | - addListener: |
เพิ่ม Listener ลงในรายการ Listener ของออบเจ็กต์นี้ เพิ่มเติม... | |
(void) | - removeListener: |
นำ Listener ออกจากรายการ Listener ของออบเจ็กต์นี้ เพิ่มเติม... | |
(GCKRequest *) | - loadMedia: |
โหลดและเริ่มเล่นรายการสื่อใหม่ เพิ่มเติม... | |
(GCKRequest *) | - loadMedia:autoplay: |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - loadMedia:autoplay:playPosition: |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - loadMedia:autoplay:playPosition:customData: |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - loadMedia:autoplay:playPosition:activeTrackIDs: |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - loadMedia:autoplay:playPosition:activeTrackIDs:customData: |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - setActiveTrackIDs: |
ตั้งค่าแทร็กที่ใช้งานอยู่ เพิ่มเติม... | |
(GCKRequest *) | - setTextTrackStyle: |
ตั้งค่ารูปแบบแทร็กข้อความ เพิ่มเติม... | |
(GCKRequest *) | - pause |
หยุดเล่นรายการสื่อปัจจุบันชั่วคราว เพิ่มเติม... | |
(GCKRequest *) | - pauseWithCustomData: |
หยุดเล่นรายการสื่อปัจจุบันชั่วคราว เพิ่มเติม... | |
(GCKRequest *) | - stop |
หยุดเล่นรายการสื่อปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - stopWithCustomData: |
หยุดเล่นรายการสื่อปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - play |
เริ่ม (หรือกลับมา) เล่นรายการสื่อปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - playWithCustomData: |
เริ่ม (หรือกลับมา) เล่นรายการสื่อปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - seekToTimeInterval: |
ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - seekToTimeInterval:resumeState: |
ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - seekToTimeInterval:resumeState:customData: |
ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - queueLoadItems:startIndex:repeatMode: |
โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - queueLoadItems:startIndex:repeatMode:customData: |
โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - queueLoadItems:startIndex:playPosition:repeatMode:customData: |
โหลดและเริ่มเล่นคิวใหม่ของรายการสื่อ (ไม่บังคับ) เพิ่มเติม... | |
(GCKRequest *) | - queueInsertItems:beforeItemWithID: |
แทรกรายการสื่อใหม่ลงในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueInsertItems:beforeItemWithID:customData: |
แทรกรายการสื่อใหม่ลงในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueInsertItem:beforeItemWithID: |
เมธอดที่สะดวกซึ่งแทรกรายการเดียวลงในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueInsertAndPlayItem:beforeItemWithID: |
เมธอดที่สะดวกซึ่งจะแทรกรายการเดียวลงในคิวและทำให้รายการนั้นเป็นรายการปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - queueInsertAndPlayItem:beforeItemWithID:playPosition:customData: |
เมธอดที่สะดวกซึ่งจะแทรกรายการเดียวลงในคิวและทำให้รายการนั้นเป็นรายการปัจจุบัน เพิ่มเติม... | |
(GCKRequest *) | - queueUpdateItems: |
อัปเดตคิว เพิ่มเติม... | |
(GCKRequest *) | - queueUpdateItems:customData: |
อัปเดตคิว เพิ่มเติม... | |
(GCKRequest *) | - queueRemoveItemsWithIDs: |
นำรายการสื่อออกจากคิว เพิ่มเติม... | |
(GCKRequest *) | - queueRemoveItemsWithIDs:customData: |
นำรายการสื่อออกจากคิว เพิ่มเติม... | |
(GCKRequest *) | - queueRemoveItemWithID: |
เมธอดที่สะดวกซึ่งนำรายการเดียวออกจากคิว เพิ่มเติม... | |
(GCKRequest *) | - queueReorderItemsWithIDs:insertBeforeItemWithID: |
จัดเรียงรายการสื่อในคิวใหม่ เพิ่มเติม... | |
(GCKRequest *) | - queueReorderItemsWithIDs:insertBeforeItemWithID:customData: |
จัดเรียงรายการสื่อในคิวใหม่ เพิ่มเติม... | |
(GCKRequest *) | - queueMoveItemWithID:beforeItemWithID: |
วิธีที่สะดวกในการย้ายรายการเดียวในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueJumpToItemWithID: |
ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueJumpToItemWithID:customData: |
ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueJumpToItemWithID:playPosition:customData: |
ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueNextItem |
เลื่อนไปยังรายการถัดไปในคิว เพิ่มเติม... | |
(GCKRequest *) | - queuePreviousItem |
ย้ายไปยังรายการก่อนหน้าในคิว เพิ่มเติม... | |
(GCKRequest *) | - queueSetRepeatMode: |
ตั้งค่าโหมดเล่นซ้ำในคิว เพิ่มเติม... | |
(GCKRequest *) | - setStreamVolume: |
ตั้งค่าระดับเสียงของสตรีม เพิ่มเติม... | |
(GCKRequest *) | - setStreamVolume:customData: |
ตั้งค่าระดับเสียงของสตรีม เพิ่มเติม... | |
(GCKRequest *) | - setStreamMuted: |
ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่ เพิ่มเติม... | |
(GCKRequest *) | - setStreamMuted:customData: |
ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่ เพิ่มเติม... | |
(GCKRequest *) | - requestStatus |
ขอข้อมูลสถานะสื่อที่อัปเดตจากผู้รับ เพิ่มเติม... | |
(NSTimeInterval) | - approximateStreamPosition |
แสดงผลตำแหน่งสตรีมโดยประมาณซึ่งคำนวณจากข้อมูลสตรีมที่ได้รับล่าสุดและเวลาจริงที่ผ่านไปนับตั้งแต่การอัปเดตนั้น เพิ่มเติม... | |
(void) | - notifyDidStartMediaSession |
เรียกใช้โดยคลาสย่อยเมื่อใดก็ตามที่เซสชันสื่อเริ่มต้น กล่าวคือ ทันทีหลังจากโหลดสื่อใหม่ลงในเพลเยอร์ระยะไกลเรียบร้อยแล้ว เพิ่มเติม... | |
(void) | - notifyDidUpdateMediaStatus |
เพื่อเรียกใช้โดยคลาสย่อยทุกครั้งที่ออบเจ็กต์ mediaStatus ของไคลเอ็นต์เปลี่ยนแปลง เพิ่มเติม... | |
(void) | - notifyDidUpdateQueue |
เพื่อเรียกใช้โดยคลาสย่อยทุกครั้งที่คิวสื่อที่ไคลเอ็นต์จัดการมีการเปลี่ยนแปลง เพิ่มเติม... | |
(void) | - notifyDidUpdatePreloadStatus |
เรียกใช้โดยคลาสย่อยเมื่อใดก็ตามที่ GCKMediaStatus::preloadedItemID สำหรับ mediaStatus ของไคลเอ็นต์มีการเปลี่ยนแปลง เพิ่มเติม... | |
(void) | - notifyDidUpdateMetadata |
เพื่อให้คลาสย่อยเรียกใช้ได้ทุกเมื่อที่ข้อมูลเมตาเปลี่ยนแปลง เพิ่มเติม... | |
สรุปพร็อพเพอร์ตี้ | |
BOOL | connected |
แฟล็กที่ระบุว่าออบเจ็กต์นี้เชื่อมต่อกับเซสชันหรือไม่ เพิ่มเติม... | |
GCKMediaStatus * | mediaStatus |
สถานะสื่อปัจจุบันตามที่รายงานโดยช่องควบคุมสื่อ เพิ่มเติม... | |
NSTimeInterval | timeSinceLastMediaStatusUpdate |
ระยะเวลาที่ผ่านไปนับตั้งแต่ได้รับการอัปเดตสถานะสื่อครั้งล่าสุด เพิ่มเติม... | |
id< GCKRemoteMediaClientAdInfoParserDelegate > | adInfoParserDelegate |
ผู้มอบสิทธิ์ที่สามารถดึงข้อมูลช่วงพักโฆษณาจากข้อมูลที่กำหนดเองในออบเจ็กต์ GCKMediaStatus เพิ่มเติม... | |
รายละเอียดวิธีการ
- (void) addListener: | (id< GCKRemoteMediaClientListener >) | listener |
เพิ่ม Listener ลงในรายการ Listener ของออบเจ็กต์นี้
- Parameters
-
listener The listener to add.
- (void) removeListener: | (id< GCKRemoteMediaClientListener >) | listener |
นำ Listener ออกจากรายการ Listener ของออบเจ็กต์นี้
- Parameters
-
listener The listener to remove.
- (GCKRequest *) loadMedia: | (GCKMediaInformation *) | mediaInfo |
โหลดและเริ่มเล่นรายการสื่อใหม่
- Parameters
-
mediaInfo An object describing the media item to load.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) loadMedia: | (GCKMediaInformation *) | mediaInfo | |
autoplay: | (BOOL) | autoplay | |
โหลดและเริ่มเล่นรายการสื่อใหม่ (ไม่บังคับ)
- Parameters
-
mediaInfo An object describing the media item to load. autoplay Whether playback should start immediately.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) setActiveTrackIDs: | (NSArray< NSNumber * > *__nullable) | activeTrackIDs |
ตั้งค่าแทร็กที่ใช้งานอยู่
คำขอจะล้มเหลวหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
activeTrackIDs An array of integers specifying the active tracks. May be empty or nil
to disable any currently active tracks.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) setTextTrackStyle: | (GCKMediaTextTrackStyle *__nullable) | textTrackStyle |
ตั้งค่ารูปแบบแทร็กข้อความ
คำขอจะล้มเหลวหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
textTrackStyle The text track style. The style will not be changed if this is nil
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) pause |
หยุดเล่นรายการสื่อปัจจุบันชั่วคราว
คำขอจะล้มเหลวหากไม่มีสถานะสื่อปัจจุบัน
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) stop |
หยุดเล่นรายการสื่อปัจจุบัน
หากมีการโหลดคิวอยู่ ระบบจะนำคิวดังกล่าวออก คำขอจะล้มเหลวหากไม่มีสถานะสื่อปัจจุบัน
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) play |
เริ่ม (หรือกลับมา) เล่นรายการสื่อปัจจุบัน
การเล่นจะเริ่มที่จุดเริ่มต้นของสตรีมเสมอ คำขอจะล้มเหลวหากไม่มีสถานะสื่อปัจจุบัน
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) seekToTimeInterval: | (NSTimeInterval) | position |
ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน
คำขอจะล้มเหลวหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
position The new position from the beginning of the stream.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaResumeState) | resumeState | |
ไปยังตำแหน่งใหม่ภายในรายการสื่อปัจจุบัน
คำขอจะล้มเหลวหากไม่มีสถานะสื่อปัจจุบัน
- Parameters
-
position The new position interval from the beginning of the stream. resumeState The action to take after the seek operation has finished.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) seekToTimeInterval: | (NSTimeInterval) | position | |
resumeState: | (GCKMediaResumeState) | 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) queueUpdateItems: | (NSArray< GCKMediaQueueItem * > *) | queueItems |
อัปเดตคิว
- Parameters
-
queueItems The list of updated items.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) queueRemoveItemsWithIDs: | (NSArray< NSNumber * > *) | itemIDs |
นำรายการสื่อออกจากคิว
หากคิวว่างเปล่า เซสชันสื่อปัจจุบันจะสิ้นสุดลง
- Parameters
-
itemIDs An array of media item IDs identifying the items to remove. Must not be nil
or empty.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) queueRemoveItemWithID: | (NSUInteger) | itemID |
เมธอดที่สะดวกซึ่งนำรายการเดียวออกจากคิว
- Parameters
-
itemID The ID of the item to remove.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) queueJumpToItemWithID: | (NSUInteger) | itemID |
ข้ามไปยังรายการที่มีรหัสที่ระบุในคิว
- Parameters
-
itemID The ID of the item to jump to.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) queueNextItem |
เลื่อนไปยังรายการถัดไปในคิว
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) queuePreviousItem |
ย้ายไปยังรายการก่อนหน้าในคิว
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) queueSetRepeatMode: | (GCKMediaRepeatMode) | repeatMode |
ตั้งค่าโหมดเล่นซ้ำในคิว
- Parameters
-
repeatMode The new repeat mode.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) setStreamVolume: | (float) | volume |
ตั้งค่าระดับเสียงของสตรีม
คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน
- Parameters
-
volume The new volume, in the range [0.0 - 1.0].
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) setStreamMuted: | (BOOL) | muted |
ตั้งค่าว่าสตรีมจะปิดเสียงหรือไม่
คำขอจะไม่สำเร็จหากไม่มีเซสชันสื่อปัจจุบัน
- Parameters
-
muted Whether the stream should be muted or unmuted.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) 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
.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (GCKRequest *) requestStatus |
ขอข้อมูลสถานะสื่อที่อัปเดตจากผู้รับ
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สำหรับติดตามคำขอนี้
- (NSTimeInterval) approximateStreamPosition |
แสดงผลตำแหน่งสตรีมโดยประมาณซึ่งคำนวณจากข้อมูลสตรีมที่ได้รับล่าสุดและเวลาจริงที่ผ่านไปนับตั้งแต่การอัปเดตนั้น
แสดงผล 0 หากไม่ได้เชื่อมต่อช่องหรือหากไม่มีการโหลดสื่อในขณะนี้
- (void) notifyDidStartMediaSession |
เรียกใช้โดยคลาสย่อยเมื่อใดก็ตามที่เซสชันสื่อเริ่มต้น กล่าวคือ ทันทีหลังจากโหลดสื่อใหม่ลงในเพลเยอร์ระยะไกลเรียบร้อยแล้ว
ให้บริการโดยหมวดหมู่ GCKRemoteMediaClient(Protected)
- (void) notifyDidUpdateMediaStatus |
เพื่อเรียกใช้โดยคลาสย่อยทุกครั้งที่ออบเจ็กต์ mediaStatus ของไคลเอ็นต์เปลี่ยนแปลง
ให้บริการโดยหมวดหมู่ GCKRemoteMediaClient(Protected)
- (void) notifyDidUpdateQueue |
เพื่อเรียกใช้โดยคลาสย่อยทุกครั้งที่คิวสื่อที่ไคลเอ็นต์จัดการมีการเปลี่ยนแปลง
ให้บริการโดยหมวดหมู่ GCKRemoteMediaClient(Protected)
- (void) notifyDidUpdatePreloadStatus |
เรียกใช้โดยคลาสย่อยเมื่อใดก็ตามที่ GCKMediaStatus::preloadedItemID สำหรับ mediaStatus ของไคลเอ็นต์มีการเปลี่ยนแปลง
ให้บริการโดยหมวดหมู่ GCKRemoteMediaClient(Protected)
- (void) notifyDidUpdateMetadata |
เพื่อให้คลาสย่อยเรียกใช้ได้ทุกเมื่อที่ข้อมูลเมตาเปลี่ยนแปลง
ให้บริการโดยหมวดหมู่ GCKRemoteMediaClient(Protected)
รายละเอียดพร็อพเพอร์ตี้
|
readnonatomicassign |
แฟล็กที่ระบุว่าออบเจ็กต์นี้เชื่อมต่อกับเซสชันหรือไม่
|
readnonatomicstrong |
สถานะสื่อปัจจุบันตามที่รายงานโดยช่องควบคุมสื่อ
|
readnonatomicassign |
ระยะเวลาที่ผ่านไปนับตั้งแต่ได้รับการอัปเดตสถานะสื่อครั้งล่าสุด
หากคำขอสถานะอยู่ระหว่างดำเนินการ ค่านี้จะเป็น 0
|
readwritenonatomicweak |
ผู้มอบสิทธิ์ที่สามารถดึงข้อมูลช่วงพักโฆษณาจากข้อมูลที่กำหนดเองในออบเจ็กต์ GCKMediaStatus
- Deprecated:
- โปรดใช้ GCKAdBreakStatus แทน