ภาพรวม
คลาสที่จัดการเซสชันการแคสต์ด้วยอุปกรณ์ตัวรับ
GCKSessionManager จะสร้างและจัดการเซสชันโดยอัตโนมัติ แอปพลิเคชันไม่ควรเรียกใช้เมธอดของวงจรการเข้าชมโดยตรง เช่น start (GCKSession(Protected)) หรือ endWithAction: (GCKSession(Protected))
- Since
- 3.0
รับค่าจาก GCKSession
สรุปเมธอดของอินสแตนซ์ | |
(instancetype) | - initWithDevice:sessionID:sessionOptions:castOptions: |
สร้างเซสชันการแคสต์ใหม่ด้วยตัวเลือกแคสต์ที่กําหนด เพิ่มเติม... | |
(BOOL) | - addChannel: |
ลงทะเบียนช่องกับเซสชันนี้ เพิ่มเติม... | |
(BOOL) | - removeChannel: |
นําช่องที่ลงทะเบียนก่อนหน้านี้ออกจากเซสชัน เพิ่มเติม... | |
(void) | - addDeviceStatusListener: |
เพิ่ม GCKCastDeviceStatusListener ลงในรายการ Listener ของออบเจ็กต์นี้ เพิ่มเติม... | |
(void) | - removeDeviceStatusListener: |
นํา GCKCastDeviceStatusListener ออกจากรายการ Listener ของออบเจ็กต์นี้ เพิ่มเติม... | |
(GCKRequest *) | - setDeviceVolume:forMultizoneDevice: |
ตั้งระดับเสียงของอุปกรณ์แต่ละเครื่องในกลุ่มมัลติโซน เพิ่มเติม... | |
(GCKRequest *) | - setDeviceMuted:forMultizoneDevice: |
ตั้งค่าสถานะการปิดเสียงของอุปกรณ์แต่ละเครื่องในกลุ่มมัลติโซน เพิ่มเติม... | |
(GCKRequest *) | - requestMultizoneStatus |
ขอสถานะมัลติโซนจากกลุ่มหลายกลุ่ม เพิ่มเติม... | |
(instancetype) | - initWithDevice:traits:sessionID: |
เริ่มต้นอ็อบเจ็กต์เซสชันใหม่สําหรับอุปกรณ์ที่ระบุ พร้อมตัวเลือกเริ่มต้น เพิ่มเติม... | |
(instancetype) | - initWithDevice:traits:sessionID:sessionOptions: |
เริ่มต้นออบเจ็กต์เซสชันใหม่สําหรับอุปกรณ์ที่ระบุ เพิ่มเติม... | |
(GCKRequest *) | - setDeviceVolume: |
ตั้งระดับเสียงของอุปกรณ์ เพิ่มเติม... | |
(GCKRequest *) | - setDeviceMuted: |
ตั้งค่าสถานะการปิดเสียงของอุปกรณ์ เพิ่มเติม... | |
(void) | - start |
เริ่มเซสชัน เพิ่มเติม... | |
(void) | - endWithAction: |
จบเซสชันที่มีการทํางานที่ระบุ เพิ่มเติม... | |
(void) | - notifyDidStartWithSessionID: |
ชั้นเรียนย่อยจะโทรเพื่อแจ้งกรอบการทํางานว่าได้เริ่มเซสชันแล้ว เพิ่มเติม... | |
(void) | - notifyDidFailToStartWithError: |
โทรหาคลาสย่อยเพื่อแจ้งเฟรมเวิร์กว่าเซสชันล้มเหลว เพิ่มเติม... | |
(void) | - notifyDidEndWithError:willTryToResume: |
โทรหาคลาสย่อยเพื่อแจ้งเฟรมเวิร์กว่าเซสชันสิ้นสุดแล้ว เพิ่มเติม... | |
(void) | - notifyDidReceiveDeviceVolume:muted: |
โทรหาโดยคลาสย่อยเพื่อแจ้งกรอบการทํางานว่าได้รับระดับเสียงที่อัปเดตและสถานะปิดเสียงของอุปกรณ์แล้ว เพิ่มเติม... | |
(void) | - notifyDidReceiveDeviceStatus: |
โทรหาคลาสย่อยเพื่อแจ้งเฟรมเวิร์กว่าได้รับสถานะที่อัปเดตแล้วจากอุปกรณ์ เพิ่มเติม... | |
(void) | - notifyDidSuspendWithReason: |
เลิกใช้ อย่าใช้ - ดําเนินการในแบบโหนด เพิ่มเติม... | |
(void) | - notifyDidResume |
เลิกใช้ อย่าใช้ - ดําเนินการในแบบโหนด เพิ่มเติม... | |
สรุปพร็อพเพอร์ตี้ | |
GCKActiveInputStatus | activeInputStatus |
สถานะ "อินพุตที่ใช้งาน" ปัจจุบันของอุปกรณ์ เพิ่มเติม... | |
GCKStandbyStatus | standbyStatus |
สถานะ "สแตนด์บาย" ปัจจุบันของอุปกรณ์ เพิ่มเติม... | |
GCKApplicationMetadata * | applicationMetadata |
ข้อมูลเมตาสําหรับแอปพลิเคชันในรีซีฟเวอร์ที่กําลังใช้งานในอุปกรณ์ของผู้รับ หากมี nil เพิ่มเติม... | |
GCKDevice * | device |
อุปกรณ์ที่เชื่อมโยงกับเซสชันนี้ เพิ่มเติม... | |
NSString * | sessionID |
รหัสเซสชันปัจจุบัน (หากมี) เพิ่มเติม... | |
GCKSessionOptions * | sessionOptions |
ตัวเลือกของเซสชัน (หากมี) เพิ่มเติม... | |
GCKConnectionState | connectionState |
สถานะการเชื่อมต่อเซสชันปัจจุบัน เพิ่มเติม... | |
BOOL | suspended |
การแจ้งที่ระบุว่าเซสชันถูกระงับอยู่ในปัจจุบันหรือไม่ เพิ่มเติม... | |
NSString * | deviceStatusText |
ข้อความสถานะอุปกรณ์ปัจจุบัน เพิ่มเติม... | |
GCKSessionTraits * | traits |
ลักษณะเฉพาะของเซสชัน เพิ่มเติม... | |
float | currentDeviceVolume |
ระดับเสียงของอุปกรณ์ในช่วง [0.0, 1.0] เพิ่มเติม... | |
BOOL | currentDeviceMuted |
สถานะปิดเสียงอุปกรณ์ปัจจุบัน เพิ่มเติม... | |
GCKRemoteMediaClient * | remoteMediaClient |
ออบเจ็กต์ GCKRemoteMediaClient ที่ใช้ควบคุมการเล่นสื่อในเซสชันนี้ได้ เพิ่มเติม... | |
GCKMediaMetadata * | mediaMetadata |
ข้อมูลเมตาของสื่อในปัจจุบัน (หากมี) เพิ่มเติม... | |
รายละเอียดของเมธอด
- (instancetype) initWithDevice: | (GCKDevice *) | device | |
sessionID: | (nullable NSString *) | sessionID | |
sessionOptions: | (nullable GCKSessionOptions *) | sessionOptions | |
castOptions: | (GCKCastOptions *) | castOptions | |
สร้างเซสชันการแคสต์ใหม่ด้วยตัวเลือกแคสต์ที่กําหนด
- Parameters
-
device The receiver device. sessionID The session ID, if resuming; otherwise nil
.sessionOptions The session options, if any; otherwise nil
.castOptions The Cast options.
- Since
- 4.0
- (BOOL) addChannel: | (GCKCastChannel *) | channel |
ลงทะเบียนช่องกับเซสชันนี้
หากมีการเชื่อมต่อเซสชันและแอปพลิเคชันตัวรับรองรับเนมสเปซของช่องแล้ว ระบบจะเชื่อมต่อแชนเนลโดยอัตโนมัติ หากเซสชันไม่ได้เชื่อมต่อ ช่องจะยังคงอยู่ในสถานะยกเลิกการเชื่อมต่อจนกว่าเซสชันจะเริ่มต้นขึ้น
- Parameters
-
channel The channel to register.
- การคืนสินค้า
YES
หากช่องได้รับการลงทะเบียนเรียบร้อยแล้วNO
มิเช่นนั้น
- (BOOL) removeChannel: | (GCKCastChannel *) | channel |
นําช่องที่ลงทะเบียนก่อนหน้านี้ออกจากเซสชัน
- Parameters
-
channel The channel to unregister.
- การคืนสินค้า
YES
หากยกเลิกการลงทะเบียนช่องเรียบร้อยแล้วNO
หรือไม่เช่นนั้น
- (void) addDeviceStatusListener: | (id< GCKCastDeviceStatusListener >) | listener |
เพิ่ม GCKCastDeviceStatusListener ลงในรายการ Listener ของออบเจ็กต์นี้
Listener ที่เพิ่มเข้ามาถือไว้อย่างอ่อน และควรเก็บไว้เพื่อหลีกเลี่ยงการพบดีลโดยไม่คาดคิด
- Parameters
-
listener The listener to add.
- (void) removeDeviceStatusListener: | (id< GCKCastDeviceStatusListener >) | listener |
นํา GCKCastDeviceStatusListener ออกจากรายการ Listener ของออบเจ็กต์นี้
- Parameters
-
listener The listener to remove.
- (GCKRequest *) setDeviceVolume: | (float) | volume | |
forMultizoneDevice: | (GCKMultizoneDevice *) | device | |
ตั้งระดับเสียงของอุปกรณ์แต่ละเครื่องในกลุ่มมัลติโซน
การดําเนินการนี้เป็นการดําเนินการแบบอะซิงโครนัส
- Parameters
-
volume The new volume, in the range [0.0, 1.0]. device The multizone device.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สําหรับติดตามคําขอ
- (GCKRequest *) setDeviceMuted: | (BOOL) | muted | |
forMultizoneDevice: | (GCKMultizoneDevice *) | device | |
ตั้งค่าสถานะการปิดเสียงของอุปกรณ์แต่ละเครื่องในกลุ่มมัลติโซน
การดําเนินการนี้เป็นการดําเนินการแบบอะซิงโครนัส
- Parameters
-
muted The new muted state. device The multizone device.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สําหรับติดตามคําขอ
- (GCKRequest *) requestMultizoneStatus |
ขอสถานะมัลติโซนจากกลุ่มหลายกลุ่ม
การดําเนินการนี้เป็นการดําเนินการแบบอะซิงโครนัส เมื่อได้รับสถานะมัลติโซนแล้ว ระบบจะส่งวิธีการมอบสิทธิ์ castSession:didReceiveMultizoneStatus: (GCKCastDeviceStatusListener-p) ไปให้
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สําหรับติดตามคําขอ
- (instancetype) initWithDevice: | (GCKDevice *) | device | |
traits: | (nullable GCKSessionTraits *) | traits | |
sessionID: | (nullable NSString *) | sessionID | |
เริ่มต้นอ็อบเจ็กต์เซสชันใหม่สําหรับอุปกรณ์ที่ระบุ พร้อมตัวเลือกเริ่มต้น
- Parameters
-
device The device. traits The session traits. sessionID The session ID of an existing session, if this object will be used to resume a session; otherwise nil
if it will be used to start a new session.
- (instancetype) initWithDevice: | (GCKDevice *) | device | |
traits: | (nullable GCKSessionTraits *) | traits | |
sessionID: | (nullable NSString *) | sessionID | |
sessionOptions: | (nullable GCKSessionOptions *) | sessionOptions | |
เริ่มต้นออบเจ็กต์เซสชันใหม่สําหรับอุปกรณ์ที่ระบุ
- Parameters
-
device The device. traits The session traits. sessionID The session ID of an existing session, if this object will be used to resume a session; otherwise nil
if it will be used to start a new session.sessionOptions The session options, if any; otherwise nil
.
- Since
- 4.0
- (GCKRequest *) setDeviceVolume: | (float) | volume |
ตั้งระดับเสียงของอุปกรณ์
การดําเนินการนี้เป็นการดําเนินการแบบอะซิงโครนัส การติดตั้งเริ่มต้นคือไม่ดําเนินการ ซึ่งล้มเหลวกับคําขอที่มีข้อผิดพลาด GCKErrorCodeSupportedFeature
- Parameters
-
volume The new volume.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สําหรับติดตามคําขอ
- Since
- 3.4 ในเฟรมเวิร์กเวอร์ชันก่อนหน้า เมธอดนี้แสดงผล
void
- (GCKRequest *) setDeviceMuted: | (BOOL) | muted |
ตั้งค่าสถานะการปิดเสียงของอุปกรณ์
การดําเนินการนี้เป็นการดําเนินการแบบอะซิงโครนัส การติดตั้งเริ่มต้นคือไม่ดําเนินการ ซึ่งล้มเหลวกับคําขอที่มีข้อผิดพลาด GCKErrorCodeSupportedFeature
- Parameters
-
muted The new mute state.
- การคืนสินค้า
- ออบเจ็กต์ GCKRequest สําหรับติดตามคําขอ
- Since
- 3.4 ในเฟรมเวิร์กเวอร์ชันก่อนหน้า เมธอดนี้แสดงผล
void
- (void) start |
เริ่มเซสชัน
การดําเนินการนี้เป็นการดําเนินการแบบอะซิงโครนัส ต้องลบล้างโดยคลาสย่อย
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) endWithAction: | (GCKSessionEndAction) | action |
จบเซสชันที่มีการทํางานที่ระบุ
การดําเนินการนี้เป็นการดําเนินการแบบอะซิงโครนัส ต้องลบล้างโดยคลาสย่อย
- Parameters
-
action The action to take when ending the session; see GCKSessionEndAction for more details.
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) notifyDidStartWithSessionID: | (NSString *) | sessionID |
ชั้นเรียนย่อยจะโทรเพื่อแจ้งกรอบการทํางานว่าได้เริ่มเซสชันแล้ว
- Parameters
-
sessionID The session's unique ID.
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) notifyDidFailToStartWithError: | (GCKError *) | error |
โทรหาคลาสย่อยเพื่อแจ้งเฟรมเวิร์กว่าเซสชันล้มเหลว
- Parameters
-
error The error that occurred.
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) notifyDidEndWithError: | (nullable NSError *) | error | |
willTryToResume: | (BOOL) | willTryToResume | |
โทรหาคลาสย่อยเพื่อแจ้งเฟรมเวิร์กว่าเซสชันสิ้นสุดแล้ว
- Parameters
-
error The error that caused the session to end, if any. Should be nil
if the session was ended intentionally.willTryToResume Whether the session will try to resume itself automatically.
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) notifyDidReceiveDeviceVolume: | (float) | volume | |
muted: | (BOOL) | muted | |
โทรหาโดยคลาสย่อยเพื่อแจ้งกรอบการทํางานว่าได้รับระดับเสียงที่อัปเดตและสถานะปิดเสียงของอุปกรณ์แล้ว
- Parameters
-
volume The device's current volume. Must be in the range [0, 1.0]; muted The device's current mute state.
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) notifyDidReceiveDeviceStatus: | (nullable NSString *) | statusText |
โทรหาคลาสย่อยเพื่อแจ้งเฟรมเวิร์กว่าได้รับสถานะที่อัปเดตแล้วจากอุปกรณ์
- Parameters
-
statusText The new status.
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) notifyDidSuspendWithReason: | (GCKConnectionSuspendReason) | reason |
เลิกใช้งานแล้ว อย่าใช้ - ดําเนินการเป็น "no-op"
- Deprecated:
- ไม่ต้องโทร
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
- (void) notifyDidResume |
เลิกใช้งานแล้ว อย่าใช้ - ดําเนินการเป็น "no-op"
- Deprecated:
- ไม่ต้องโทร
ให้บริการโดยหมวดหมู่ GCKSession(Protected)
รายละเอียดอสังหาริมทรัพย์
|
readnonatomicassign |
สถานะ "อินพุตที่ใช้งาน" ปัจจุบันของอุปกรณ์
|
readnonatomicassign |
สถานะ "สแตนด์บาย" ปัจจุบันของอุปกรณ์
|
readnonatomiccopy |
ข้อมูลเมตาสําหรับแอปพลิเคชันในรีซีฟเวอร์ที่กําลังใช้งานในอุปกรณ์ของผู้รับ หากมี nil
|
readnonatomicstronginherited |
อุปกรณ์ที่เชื่อมโยงกับเซสชันนี้
|
readnonatomiccopyinherited |
รหัสเซสชันปัจจุบัน (หากมี)
|
readnonatomicstronginherited |
ตัวเลือกของเซสชัน (หากมี)
- Since
- 4.0
|
readnonatomicassigninherited |
สถานะการเชื่อมต่อเซสชันปัจจุบัน
|
readnonatomicassigninherited |
การแจ้งที่ระบุว่าเซสชันถูกระงับอยู่ในปัจจุบันหรือไม่
- Deprecated:
- GCKSession ไม่สนับสนุนการอยู่ในสถานะถูกระงับแล้ว หากจําเป็น ให้ย้ายฟังก์ชันนี้ไปยังคลาสย่อย
|
readnonatomiccopyinherited |
ข้อความสถานะอุปกรณ์ปัจจุบัน
|
readnonatomiccopyinherited |
ลักษณะเฉพาะของเซสชัน
|
readnonatomicassigninherited |
ระดับเสียงของอุปกรณ์ในช่วง [0.0, 1.0]
|
readnonatomicassigninherited |
สถานะปิดเสียงอุปกรณ์ปัจจุบัน
|
readnonatomicstronginherited |
ออบเจ็กต์ GCKRemoteMediaClient ที่ใช้ควบคุมการเล่นสื่อในเซสชันนี้ได้
เวลา nil
ก่อนที่เซสชันจะเริ่มต้น หรือหากเซสชันไม่รองรับ GCKRemoteMediaClient API คลาสย่อยที่มีอินเทอร์เฟซ GCKRemoteMediaClient ต้องลบล้างเมธอด Getter
|
readnonatomicstronginherited |
ข้อมูลเมตาของสื่อในปัจจุบัน (หากมี)
จะเป็น nil
หากเซสชันไม่รองรับเนมสเปซของสื่อ หรือไม่ได้โหลดสื่อใดอยู่ในเครื่องรับในขณะนี้