Thyraz / Sonos-Kids-Controller

Software for self made touchscreen jukeboxes for kids. Supports Spotify streaming and uses Sonos for audio output.
152 stars 28 forks source link

Playback issues on startup #46

Closed HeikoGr closed 3 years ago

HeikoGr commented 3 years ago

When using spotify on another client and starting Sonos-Kids-Controller the Box starts resuming the old track - not the selected.

Thyraz commented 3 years ago

Hi Heiko,

not sure if I completely understand the problem. Do you e.g. start playback on the Sonos box (that is also used by your Kids-Controller) from your mobile phone, then try to start a new album from the Kids-Controller?

I also play a lot on my sons Sonos box from my mobile, but maybe it's a problem if the mobile phone didn't disconnect before the new playback. Was the mobile phone still playing on the Sonos when you tried to start the new album? Or did you just pause there and right after that started something on the Kids Controller?

HeikoGr commented 3 years ago

No. The problem occurs if i listen to Spotify on my smartphone. And then start listening to Spotify on the box.

It will always continue the song listened on the smartphone and not the selected one. I have to leave the selected album (player) and return to the overview (medialist) and select the album again.

By the way. I don't use sonos hardware. I have built an all in one box with running raspotify and glued two speakers inside. Maybe this causes the problem.

HeikoGr commented 3 years ago

ok. i think i found the reason in the spotifycontroller over here: https://github.com/amueller-tech/spotifycontroller/blob/c820f5564b118585e8fb75709e668b66c6ba811f/spotify-control.js#L99 the play function throws an error and starts the function "handleSpotifyError" instead of starting to play.

i will open another ticket on the other repository and will try to solve the problem.

Thyraz commented 3 years ago

ok, thank you for the feedback. :)