<GCKSessionManagerListener> Protocol
Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
The GCKSessionManagerListener protocol allows listeners to be notified about session events managed by GCKSessionManager.
All methods in the protocol are optional and include variations for any session type and specifically for Cast sessions.
Listeners are invoked in the order they are registered, with framework components' listeners called at specific points relative to application-registered listeners for certain callbacks.
The protocol provides callbacks for various session lifecycle events, including starting, ending, failing to start, suspending, and resuming sessions.
Callbacks are also available for receiving updates on device volume, mute state, and status text for sessions.
The GCKSessionManager listener protocol.
The protocol's methods are all optional. All of the notification methods come in two varieties: one that is invoked for any session type, and one that is invoked specifically for Cast sessions.
Listeners are invoked in the order that they were registered. GCKSessionManagerListener instances which are registered by components of the framework itself (such as GCKUIMediaController ), will always be invoked after those that are registered by the application for the callbacks sessionManager:willStartSession: (GCKSessionManagerListener-p) , sessionManager:willStartCastSession: (GCKSessionManagerListener-p) , sessionManager:willResumeSession: (GCKSessionManagerListener-p) , and sessionManager:willResumeCastSession: (GCKSessionManagerListener-p) ; and before those that are registered by the application for all of the remaining callbacks.
Since 3.0
Inherits <NSObjectNSObject>.
Called when a session is about to be started.
Parameters
sessionManager The session manager.
session The session.
Called when a session has been successfully started.
Parameters
sessionManager The session manager.
session The session.
Called when a Cast session is about to be started.
Parameters
sessionManager The session manager.
session The session.
Called when a Cast session has been successfully started.
Parameters
sessionManager The session manager.
session The Cast session.
Called when a session is about to be ended, either by request or due to an error.
Parameters
sessionManager The session manager.
session The session.
- (void) sessionManager:
(GCKSessionManager *)
sessionManager
didEndSession:
(GCKSession *)
session
withError:
(NSError *__nullable)
error
optional
Called when a session has ended, either by request or due to an error.
Parameters
sessionManager The session manager.
session The session.
error The error, if any; otherwise nil.
Called when a Cast session is about to be ended, either by request or due to an error.
Parameters
sessionManager The session manager.
session The session.
Called when a Cast session has ended, either by request or due to an 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
Called when a session has failed to start.
Parameters
sessionManager The session manager.
session The session.
error The error.
Called when a Cast session has failed to start.
Parameters
sessionManager The session manager.
session The Cast session.
error The error.
Called when a session has been suspended.
Parameters
sessionManager The session manager.
session The session.
reason The reason for the suspension.
Called when a Cast session has been suspended.
Parameters
sessionManager The session manager.
session The Cast session.
reason The reason for the suspension.
Called when a session is about to be resumed.
Parameters
sessionManager The session manager.
session The session.
Called when a session has been successfully resumed.
Parameters
sessionManager The session manager.
session The session.
Called when a Cast session is about to be resumed.
Parameters
sessionManager The session manager.
session The session.
Called when a Cast session has been successfully resumed.
Parameters
sessionManager The session manager.
session The Cast session.
Called when the device associated with this session has changed in some way (for example, the friendly name has changed).
Parameters
sessionManager The session manager.
session The Cast session.
device The updated device object.
Since 3.2
- (void) sessionManager:
(GCKSessionManager *)
sessionManager
session:
(GCKSession *)
session
didReceiveDeviceVolume:
(float)
volume
muted:
(BOOL)
muted
optional
Called when updated device volume and mute state for a session have been received.
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
Called when updated device volume and mute state for a Cast session have been received.
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:
(NSString *__nullable)
statusText
optional
Called when updated device status for a session has been received.
Parameters
sessionManager The session manager.
session The session.
statusText The new device status text.
- (void) sessionManager:
(GCKSessionManager *)
sessionManager
castSession:
(GCKCastSession *)
session
didReceiveDeviceStatus:
(NSString *__nullable)
statusText
optional
Called when updated device status for a Cast session has been received.
Parameters
sessionManager The session manager.
session The Cast session.
statusText The new device status text.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[],[]]