Julius-Bendt / homebridge-sonos-player

Apache License 2.0
3 stars 0 forks source link

Stateful switch for stream URIs? #11

Open adamstamper opened 2 months ago

adamstamper commented 2 months ago

Hi @Julius-Bendt, many thanks for making this - exactly what I was looking for! The URI also works with .m3u8 streams which is great for custom control of radio. With this usecase it would be handy for the switch to be stateful - ie, when you toggle a homebridge-sonos-player switch to 'on' it starts the Sonos playing the stream, and when you toggle it 'off' it pauses the Sonos. Is this something you'd consider adding as an option? Thanks again!

Julius-Bendt commented 1 month ago

That is an amazing idea! I'll most likely have to make some breaking changes in order to keep the code somewhat clean, but it should be possible.

Julius-Bendt commented 1 month ago

@adamstamper could you provide me with the link you're using?

EDIT: nevermind. I was missing the "x-rincon-mp3radio://" part of the url.

adamstamper commented 1 month ago

@adamstamper could you provide me with the link you're using?

EDIT: nevermind. I was missing the "x-rincon-mp3radio://" part of the url.

Sorry I missed your question - I'm actually using a plain http stream URI, it seems some formats work with just http:// whilst others require the "x-rincon-mp3radio://" prefix.

Thanks for working on this.