AmpChromecastObserver
@objc public protocol AmpChromecastObserver
Protocol used to receive Chromecast events.
-
Callback called when a device has connected.
Declaration
Swift
@objc optional func onChromecastDeviceConnected(_ manager: AmpChromecastManager, device: GCKDevice)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
device
The device that triggered the event.
-
Callback called when a device has disconnected.
Declaration
Swift
@objc optional func onChromecastDeviceDisconnected(_ manager: AmpChromecastManager, device: GCKDevice)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
device
The device that triggered the event.
-
Callback called when the device manager has connected.
Declaration
Swift
@objc optional func onChromecastDeviceManagerConnected(_ manager: AmpChromecastManager)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
-
Callback called when the device manager has disconnected.
Declaration
Swift
@objc optional func onChromecastDeviceManagerDisconnected(_ manager: AmpChromecastManager)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
-
Callback called when the application has launched.
Declaration
Swift
@objc optional func onChromecastLaunchedApplication(_ manager: AmpChromecastManager)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
-
Callback called when the Chromecast’s media control has changed.
Declaration
Swift
@objc optional func onChromecastMediaControlChanged(_ chromecastManager: AmpChromecastManager)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
-
Callback called when the playback state of the manager changes.
Declaration
Swift
@objc optional func onChromecastPlaybackStateChanged(_ chromecastManager: AmpChromecastManager)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
-
Callback called when the position of the manager changes.
Declaration
Swift
@objc optional func onChromecastPositionChanged(_ chromecastManager: AmpChromecastManager)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
-
Callback called when an error occurs.
Declaration
Swift
@objc optional func onChromecastError(_ manager: AmpChromecastManager, error: NSError)
Parameters
chromecastManager
The instance of the Chromecast Manager that sends the event.
error
The error that triggered the event.