node-sonos-http-api
node-sonos-http-api copied to clipboard
Update preset-announcement.js to skip restore of idle players
When using presets all players get backup/restore. This affects a playing player by restoring it to the time of backup state.elapsedTime, even if this player is not included in the preset file and is supposed to be skipped. Even if pauseOthers is set to false, by this behavior the player still get interrupted one sec because it is shifted back to recorded elapsedTime.
This PR is changing "saveAll" to "savePresetPlayers" and will backup/restore only players specified in preset file. Idle players are no more affected by running presets.
Tested and found more stable when joining/leaving groups after tts or chime clips.