bhj / KaraokeEternal

Open karaoke party system
https://www.karaoke-eternal.com
ISC License
460 stars 70 forks source link

[Bug] Multiple player windows open causes at least one to fail #64

Closed Californian closed 1 year ago

Californian commented 1 year ago

If multiple player windows are opened, at least one is always broken (with an "oops..." message), and others sometimes will play the wrong song.

Sorry I don't have good reproduction steps for this, this is from memory since I've uninstalled it once this bug occurred repeatedly but I figured I'd mention here in case it was just "multiple player windows in any circumstance" and that case hadn't been considered.

bhj commented 1 year ago

Likely one of the players was blocked due to e.g. The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. - would need to check the console to confirm.

In practice though, only one player per room is supported, otherwise there are multiple players emitting different statuses to a room. Perhaps ideally they'd self-elect for leadership and sync - not a near-term priority, but definitely a future enhancement that should be revisited.