Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoiding latency when playing presets across zones? #847

Open
ibogost opened this issue Aug 1, 2022 · 2 comments
Open

Avoiding latency when playing presets across zones? #847

ibogost opened this issue Aug 1, 2022 · 2 comments

Comments

@ibogost
Copy link

ibogost commented Aug 1, 2022

After some testing, it seems that the more zones I add to a preset, the more latency I encounter before the action gets performed. A single zone (even actuated as a preset) is almost instantaneous. This is mostly an issue when using clippreset for non-music purposes, such as for doorbell sounds.

I'm just trying to understand what if any software/hardware limitation is at work here. Is there any?

If so, are there workarounds possible natively inside node-sonos-http-api, such as having a container action asynchronously call other actions? Obviously, I can make my own shell script to do this, but I'd love to be able to handle everything within the API call itself.

@jishi
Copy link
Owner

jishi commented Aug 2, 2022

IIRC, I saw problems with calling multiple players in parallel (mostly, the joining part, I assume), so I settled for doing everything sequential. This was a long time ago though, so not sure of the current state.

But there is also a lot of preparation for the coordinator (the player that becomes in charge of the playback) which needs to happen sequentially, since the calls depend on each other.

@ibogost
Copy link
Author

ibogost commented Aug 2, 2022

Interesting. I assumed it was joining them, and that was the cause of the delay.

Here's what I notice: If I curl a request to a preset with even two rooms (zones), there's a noticeable delay, probably half a second or more. If I background (curl &) requests to two (or really, any number of) different preset plays, both play instantly. Again, I can write a shell script to do this, but it sure would be nice if the API itself would handle it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants