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: ChromecastManager, 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: ChromecastManager, 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: ChromecastManager)

    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: ChromecastManager)

    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: ChromecastManager)

    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: ChromecastManager)

    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: ChromecastManager)

    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: ChromecastManager)

    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: ChromecastManager, error: NSError)

    Parameters

    chromecastManager

    The instance of the Chromecast Manager that sends the event.

    error

    The error that triggered the event.