ภาพรวม
คลาสพื้นฐานเชิงนามธรรมที่แสดงถึงเซสชันที่มีอุปกรณ์ตัวรับ
คลาสย่อยต้องใช้เมธอด start (GCKSession(Protected)) และ endWithAction: (GCKSession(Protected)) และต้องเรียกใช้เมธอดตัวแจ้งเตือนที่เหมาะสม (เช่น notifyDidStartWithSessionID: (GCKSession(Protected))) เพื่อระบุการเปลี่ยนแปลงที่สอดคล้องกันในสถานะเซสชัน คลาสย่อยอาจใช้ setDeviceVolume: (GCKSession), setDeviceMuted: (GCKSession) และ remoteMediaClient ได้ด้วย หากอุปกรณ์รองรับการดำเนินการดังกล่าว
ระบบจะสร้างและควบคุมเซสชันโดยใช้เมธอดเซสชันใน GCKSessionManager ซึ่งใช้ GCKDeviceProvider ที่เหมาะสมในการสร้างเซสชัน จากนั้นมอบสิทธิ์คำขอเซสชันไปยังออบเจ็กต์ GCKSession ดังกล่าว
- Since
- 3.0
รับค่า NSObject
รับค่าโดย GCKCastSession
| สรุปเมธอดของอินสแตนซ์ | |
| (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 | 
| เลิกใช้งานแล้ว อย่าใช้ - ติดตั้งใช้งานเป็นแบบไม่มีการดำเนินการ เพิ่มเติม... | |
| สรุปพร็อพเพอร์ตี้ | |
| 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 | |
| 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 nilif 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 nilif 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 nilif 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 | 
เลิกใช้งานแล้ว อย่าใช้ - ดำเนินการเป็นแบบไม่มีการดำเนินการ
- Deprecated:
- ไม่ต้องโทร
ให้บริการตามหมวดหมู่ GCKSession(Protected)
| - (void) notifyDidResume | 
เลิกใช้งานแล้ว อย่าใช้ - ดำเนินการเป็นแบบไม่มีการดำเนินการ
- Deprecated:
- ไม่ต้องโทร
ให้บริการตามหมวดหมู่ GCKSession(Protected)
รายละเอียดที่พัก
| 
 | readnonatomicstrong | 
อุปกรณ์ที่เชื่อมโยงกับเซสชันนี้
| 
 | readnonatomiccopy | 
รหัสเซสชันปัจจุบัน หากมี
| 
 | readnonatomicstrong | 
ตัวเลือกเซสชัน (หากมี)
- Since
- 4.0
| 
 | readnonatomicassign | 
สถานะการเชื่อมต่อเซสชันปัจจุบัน
| 
 | readnonatomicassign | 
การแจ้งที่ระบุว่าเซสชันถูกระงับอยู่ในขณะนี้หรือไม่
- Deprecated:
- GCKSession ไม่รองรับสถานะถูกระงับอีกต่อไป หากจำเป็น ให้ย้ายฟังก์ชันนี้ไปยังคลาสย่อย
| 
 | readnonatomiccopy | 
ข้อความสถานะปัจจุบันของอุปกรณ์
| 
 | readnonatomiccopy | 
ลักษณะของเซสชัน
| 
 | readnonatomicassign | 
ระดับเสียงปัจจุบันของอุปกรณ์ในช่วง [0.0, 1.0]
| 
 | readnonatomicassign | 
สถานะปิดเสียงอุปกรณ์ปัจจุบัน
| 
 | readnonatomicstrong | 
ออบเจ็กต์ GCKRemoteMediaClient ที่ใช้ควบคุมการเล่นสื่อในเซสชันนี้ได้
ตอนนี้เป็นเวลา nil ก่อนที่เซสชันจะเริ่มต้นขึ้น หรือหากเซสชันไม่รองรับ API ของ GCKRemoteMediaClient คลาสย่อยที่มีอินเทอร์เฟซ GCKRemoteMediaClient ต้องลบล้างเมธอด Getter 
| 
 | readnonatomicstrong | 
ข้อมูลเมตาของสื่อปัจจุบัน หากมี
จะเป็น nil หากเซสชันไม่รองรับเนมสเปซของสื่อ หรือหากไม่มีการโหลดสื่ออยู่ในตัวรับในขณะนี้