Protokol <GCKSessionManagerListener>
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Protokol pemroses GCKSessionManager.
Semua metode protokol bersifat opsional. Semua metode notifikasi tersedia dalam dua variasi: satu yang dipanggil untuk jenis sesi apa pun, dan satu lagi yang dipanggil khusus untuk sesi Cast.
Pemroses dipanggil sesuai urutan pendaftarannya. Instance GCKSessionManagerListener yang didaftarkan oleh komponen framework itu sendiri (seperti GCKUIMediaController), akan selalu dipanggil setelah instance yang didaftarkan oleh aplikasi untuk callback sessionManager:willStartSession: (GCKSessionManagerListener-p), sessionManager:willStartCastSession: (GCKSessionManagerListener-p), sessionManager:willResumeSession: (GCKSessionManagerListener-p), dan sessionManager:willResumeCastSession: (GCKSessionManagerListener-p); serta sebelum instance yang didaftarkan oleh aplikasi untuk semua callback yang tersisa.
- Sejak
- 3,0
Mewarisi <NSObjectNSObject>.
Dipanggil saat sesi akan dimulai.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
Dipanggil saat sesi berhasil dimulai.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
Dipanggil saat sesi Transmisi akan dimulai.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
Dipanggil saat sesi Transmisi berhasil dimulai.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
Dipanggil saat sesi akan berakhir, baik atas permintaan maupun karena error.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
didEndSession: |
|
(GCKSession *) |
session |
withError: |
|
(nullable NSError *) |
error |
|
|
| |
|
optional |
Dipanggil saat sesi telah berakhir, baik atas permintaan maupun karena error.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
error | The error, if any; otherwise nil. |
Dipanggil saat sesi Transmisi akan berakhir, baik atas permintaan maupun error.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
Dipanggil saat sesi Transmisi berakhir, baik atas permintaan maupun karena error.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
error | The error, if any; otherwise nil. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
didFailToStartSession: |
|
(GCKSession *) |
session |
withError: |
|
(NSError *) |
error |
|
|
| |
|
optional |
Dipanggil saat sesi gagal dimulai.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
error | The error. |
Dipanggil saat sesi Transmisi gagal dimulai.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
error | The error. |
Dipanggil saat sesi telah ditangguhkan.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
reason | The reason for the suspension. |
Dipanggil saat sesi Transmisi ditangguhkan.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
reason | The reason for the suspension. |
Dipanggil saat sesi akan dilanjutkan.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
Dipanggil saat sesi berhasil dilanjutkan.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
Dipanggil saat sesi Transmisi akan dilanjutkan.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
Dipanggil saat sesi Transmisi berhasil dilanjutkan.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
Dipanggil saat perangkat yang dikaitkan dengan sesi ini telah berubah dengan cara tertentu (misalnya, nama ramah telah berubah).
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
device | The updated device object. |
- Sejak
- 3,2
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
session: |
|
(GCKSession *) |
session |
didReceiveDeviceVolume: |
|
(float) |
volume |
muted: |
|
(BOOL) |
muted |
|
|
| |
|
optional |
Dipanggil saat volume perangkat dan status bisukan yang diperbarui untuk sesi telah diterima.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
volume | The current volume, in the range [0.0, 1.0]. |
muted | The current mute state. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
castSession: |
|
(GCKCastSession *) |
session |
didReceiveDeviceVolume: |
|
(float) |
volume |
muted: |
|
(BOOL) |
muted |
|
|
| |
|
optional |
Dipanggil saat volume perangkat dan status bisukan yang diperbarui untuk sesi Transmisi telah diterima.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
volume | The current volume, in the range [0.0, 1.0]. |
muted | The current mute state. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
session: |
|
(GCKSession *) |
session |
didReceiveDeviceStatus: |
|
(nullable NSString *) |
statusText |
|
|
| |
|
optional |
Dipanggil saat status perangkat yang diperbarui untuk sesi telah diterima.
- Parameters
-
sessionManager | The session manager. |
session | The session. |
statusText | The new device status text. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
castSession: |
|
(GCKCastSession *) |
session |
didReceiveDeviceStatus: |
|
(nullable NSString *) |
statusText |
|
|
| |
|
optional |
Dipanggil saat status perangkat yang diperbarui untuk sesi Transmisi telah diterima.
- Parameters
-
sessionManager | The session manager. |
session | The Cast session. |
statusText | The new device status text. |
- (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
didUpdateDefaultSessionOptionsForDeviceCategory: |
|
(NSString *) |
category |
|
|
| |
|
optional |
Dipanggil saat opsi sesi default telah diubah untuk kategori perangkat tertentu.
- Parameters
-
sessionManager | The session manager. |
category | The device category. |
- Sejak
- 4,0
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2023-12-02 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2023-12-02 UTC."],[[["`GCKSessionManagerListener` protocol provides methods to monitor the lifecycle and status of Cast sessions, including start, end, suspension, and resumption."],["Listeners are notified about changes in session state through methods like `sessionManager:didStartSession:` and `sessionManager:didEndSession:withError:`."],["The protocol also includes methods to track device updates, such as volume changes (`sessionManager:session:didReceiveDeviceVolume:muted:`) and status updates (`sessionManager:session:didReceiveDeviceStatus:`)."],["Framework-registered listeners have priority for certain callbacks, specifically those related to session start and resumption."],["These optional methods are invoked in the order the listeners were registered, enabling developers to react to various session and device events."]]],[]]