Comment by Minor49er
7 days ago
The audio demo makes me think of Bandcamp which will pause music that you're playing if another Bandcamp tab starts playing a song separately. Must be a similar mechanism under the hood
7 days ago
The audio demo makes me think of Bandcamp which will pause music that you're playing if another Bandcamp tab starts playing a song separately. Must be a similar mechanism under the hood
This is likely done with the WebLocks API
That doesn't allow signaling another tab, does it?
> The Web Locks API allows scripts running in one tab or worker to asynchronously acquire a lock, hold it while work is performed, then release it. While held, no other script executing in the same origin can acquire the same lock, *which allows a web app running in multiple tabs or workers to coordinate work and the use of resources.*
source: https://developer.mozilla.org/en-US/docs/Web/API/Web_Locks_A...
4 replies →