spotifywebapipython.spotifyconnect.spotifyconnectzeroconfcastapptask
Spotify Connect Zeroconf Cast Application class.
Represents the Cast Application that is started on the Chromecast device when a Spotify Connect connection request is made.
Initializes a new instance of the class.
Arguments:
- castDevice (Chromecast): Chromecast device target.
- spotifyClientInstance (SpotifyClient): SpotifyClient instance used to transfer playback to the Chromecast device.
- getInfoResponseReceivedCallback (function): Function to call when a Spotify Connect GetInfoResponse data structure has been received from the cast device.
- zeroconfResponseReceivedCallback (function): Function to call when a Spotify Connect ZeroconfResponse data structure has been received from the cast device.
- transferPlayback (bool): True to transfer playback to the device; otherwise, False to just activate the Spotify Cast App on the device.
A string used for identification purposes only.
It has no semantics. Multiple threads may be given the same name. The initial name is set by the constructor.
Returns the Chromecast device instance if one has been initialized; otherwise, None.
Returns the Chromecast device id that was activated.
The actual deviceId that was activated may be different than the requested deviceId.
This can sometimes occur when activating a group, as getInfoResponse will return the
deviceId of the group coordinator instead of the deviceId of the group itself.
This only seems to happen in non-Google manufactured devices that have not properly
implemented the Cast protocol for grouped devices (e.g. KEF, etc); it never occurs when
casting to groups of devices manufactured by Google!
SpotifyClient instance used to transfer playback to the Chromecast device.