Protokół <GCKSessionManagerListener>
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Protokół detektora GCKSessionManager.
Metody protokołu są opcjonalne. Wszystkie metody powiadomień są dostępne w 2 odmianach: jedna z nich jest wywoływana w przypadku dowolnego typu sesji, a druga specjalnie dla sesji przesyłania.
Detektory są wywoływane w kolejności, w jakiej zostały zarejestrowane. Instancje GCKSessionManagerListener zarejestrowane przez komponenty platformy (takie jak GCKUIMediaController) zawsze będą wywoływane po tych, które zostały zarejestrowane przez aplikację na potrzeby wywołań zwrotnych sessionManager:willStartSession: (GCKSessionManagerListener-p), sessionManager:willStartCastSession: (GCKSessionManagerListener-p), sessionManager:willResumeSession: (GCKSessionManagerListener-p) i sessionManager:willResumeCastSession: (GCKSessionManagerListener-p) oraz przed tymi, które są zarejestrowane przez aplikację dla wszystkich pozostałych wywołań zwrotnych.
- Od
- 3,0
Dziedziczy <NSObjectNSObject>.
Wywoływane przed rozpoczęciem sesji.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
Wywoływane po rozpoczęciu sesji.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
Wywoływane, gdy sesja przesyłania ma się rozpocząć.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
Wywoływane po rozpoczęciu sesji przesyłania.
- Parameters
-
| sessionManager | The session manager. |
| session | The Cast session. |
Wywoływana przed zakończeniem sesji – na prośbę lub z powodu błędu.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
| - (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
| didEndSession: |
|
(GCKSession *) |
session |
| withError: |
|
(nullable NSError *) |
error |
|
|
| |
|
optional |
Wysyłane po zakończeniu sesji na żądanie lub z powodu błędu.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
| error | The error, if any; otherwise nil. |
Wywoływana przed zakończeniem sesji przesyłania na żądanie lub z powodu błędu.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
Wywoływane po zakończeniu sesji przesyłania na żądanie lub z powodu błędu.
- 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 |
Wywoływane, gdy nie udało się rozpocząć sesji.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
| error | The error. |
Wywoływane, gdy nie udało się rozpocząć sesji przesyłania.
- Parameters
-
| sessionManager | The session manager. |
| session | The Cast session. |
| error | The error. |
Wywoływane po zawieszeniu sesji.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
| reason | The reason for the suspension. |
Wywoływane po zawieszeniu sesji przesyłania.
- Parameters
-
| sessionManager | The session manager. |
| session | The Cast session. |
| reason | The reason for the suspension. |
Wywoływana, gdy sesja ma zostać wznowiona.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
Wywoływane po wznowieniu sesji.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
Wywoływane, gdy sesja przesyłania ma zostać wznowiona.
- Parameters
-
| sessionManager | The session manager. |
| session | The session. |
Wywoływane po wznowieniu sesji przesyłania.
- Parameters
-
| sessionManager | The session manager. |
| session | The Cast session. |
Wywoływane, gdy urządzenie powiązane z tą sesją w jakiś sposób uległo zmianie (na przykład zmieni się przyjazna nazwa).
- Parameters
-
| sessionManager | The session manager. |
| session | The Cast session. |
| device | The updated device object. |
- Od
- 3,2
| - (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
| session: |
|
(GCKSession *) |
session |
| didReceiveDeviceVolume: |
|
(float) |
volume |
| muted: |
|
(BOOL) |
muted |
|
|
| |
|
optional |
Wywoływane po otrzymaniu zaktualizowanej głośności i stanu wyciszenia w sesji.
- 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 |
Wywoływane po odebraniu zaktualizowanej głośności i stanu wyciszenia w sesji przesyłania.
- 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 |
Wywoływane po odebraniu zaktualizowanego stanu urządzenia w ramach sesji.
- 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 |
Wywoływane po odebraniu aktualizacji stanu urządzenia w sesji przesyłania.
- Parameters
-
| sessionManager | The session manager. |
| session | The Cast session. |
| statusText | The new device status text. |
| - (void) sessionManager: |
|
(GCKSessionManager *) |
sessionManager |
| didUpdateDefaultSessionOptionsForDeviceCategory: |
|
(NSString *) |
category |
|
|
| |
|
optional |
Wywoływana po zmianie domyślnych opcji sesji dla danej kategorii urządzenia.
- Parameters
-
| sessionManager | The session manager. |
| category | The device category. |
- Od
- 4,0
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-25 UTC."],[],[]]