The sonos.Sonos.togglePlayback() method "Currently only works for state playing or paused." However, would it be possible to have togglePlayback be able to restart a radio station (TuneIn/etc)? When a radio station is stopped, the transport state is also stopped, which is why I assume that togglePlayback() is refusing to restart the radio station due to the required playing or paused state. When I use play() radio restarts fine. Could you look into adding a special case for radio?
Expected Behavior
togglePlayback() should restart live radio (like Tunein)
Current Behavior
togglePlayback() refuses to restart radio because the current state is stopped
Possible Solution
Include a special case for Tunein radio (there may be other services affected; I'm not sure) to allow restarting of radio stations.
Sample code or executed example
Initialise a Sonos object for a sonos speaker
Play Tunein radio on the speaker (via mobile app)
Run speaker.togglePlayback(). The radio should stop.
Inspect speaker.getCurrentState(). It should be stopped.
Run speaker.togglePlayback() again. This should not restart the radio station due to the current state being stopped.
The
sonos.Sonos.togglePlayback()
method "Currently only works for stateplaying
orpaused
." However, would it be possible to havetogglePlayback
be able to restart a radio station (TuneIn/etc)? When a radio station is stopped, the transport state is alsostopped
, which is why I assume thattogglePlayback()
is refusing to restart the radio station due to the requiredplaying
orpaused
state. When I useplay()
radio restarts fine. Could you look into adding a special case for radio?Expected Behavior
togglePlayback()
should restart live radio (like Tunein)Current Behavior
togglePlayback()
refuses to restart radio because the current state isstopped
Possible Solution
Include a special case for Tunein radio (there may be other services affected; I'm not sure) to allow restarting of radio stations.
Sample code or executed example
Sonos
object for a sonos speakerspeaker.togglePlayback()
. The radio should stop.speaker.getCurrentState()
. It should bestopped
.speaker.togglePlayback()
again. This should not restart the radio station due to the current state beingstopped
.Versions (and Environment)
Node version: v8.10.0 node-sonos version: ^1.11.1 OS: Ubuntu 18.04 LTS