|
|
|
|
|
by nathan-muir
3979 days ago
|
|
If playing the sound isn't latency sensitive, you could just have each tab pick a random delay [1]. When the tabs receive the event, they each wait X milliseconds. The first timer to expire marks the event as "played". Other tabs receive this event, and abort their timers. If a "leader" disappears, it will simply fall to a tab with a larger delay. [1] Something like, rounded to 50ms increments, in a range, 100 - 1000ms. Avoiding collisions / ensuring uniqueness is left as an exercise for the reader. |
|