SamDel / ChromeCast-Desktop-Audio-Streamer

Stream the sound of your desktop to your Chromecast Audio device
MIT License
411 stars 30 forks source link

When using the web API to start casting to a device, it will not start streaming if something is already playing #120

Closed daveyijzermans closed 2 years ago

daveyijzermans commented 2 years ago

As the title suggests, when something like YouTube or some music is playing either on my Android TV or Google Cast/Nest device, and I use the web API to start casting to that device, it will not start. However, when you click play on the GUI, the media that is currently playing on the device will stop and DAS will start casting. Is this behavior intentional?

I'm using the Web API to integrate into my home automation so I can stream music from my turntable, which is connected to my PC to my cast devices. But because of this difference in behavior I would have to stop and quit any app that is running on the Android or Cast device before sending the API command to DAS.

Could I suggest you change the API behavior to match that of pressing the play button in the GUI? Or adding an additional endpoint 'play' to the web API that would mimic the play button behavior?

Thanks!

Kind regards,

Davey.

SamDel commented 2 years ago

No, it's not intentional (original issue). It should have the same behaviour as pressing the Play button, I think.

I changed it in Setup 3.8.2.zip. Calling the start API for the second time now stops streaming to the device(s), so I hope this change doesn't mess up things for other users.

Thanks Davey!

daveyijzermans commented 2 years ago

Thanks Sam, I'm all for keeping breaking changes to a minimum, but I hope this is a more sensible behavior for the API. Works great!