News for hackers. Stuff that matters.
Re:Javascript, locking and sound by javajosh on Saturday July 25, 2015 @06:54PM (#9949365)
Good rant, jwz, and thanks for the micro-knowledge that a) it's impossible to play a sound without a touch event in an iOS browser and b) multi-tab localstorage access can be problematic if you use it to coordinate activity

I think another way to solve this problem is to simply check shared memory to see if the request has been handled by any tab - if so, then don't handle it. You don't need to poll, however you might need to stagger the checks a little since playing a sound can happen so quickly. Note that this implies that every sound triggering event gets a unique id, which can be a timestamp, GUID, hash or something like that. (I'd timestamp and hash every event at the server).

There are no comments on this comment yet.