Re:Javascript, locking and sound
by vezzy-fnord on Saturday July 25, 2015 @07:18PM
(#9949426)
although IPC between web pages would probably bring some terrible security concerns
Given that CORS and cross-document messaging have largely made the same-origin policy a mere formality, it wouldn't be unsurprising for this to be next.
The gist is a lot of people want to treat the browser like a universal operating system, and by definite it will be mangled into one by any means necessary.
Re:Javascript, locking and sound
by Sanddancer on Sunday July 26, 2015 @01:35AM
(#9950262)
The problem here is that localStorage/WebStorage already creates an IPC mechanism. You're able to create objects, and other pages in the same domain can read them. Add another object as flow control, and you have all the primitives you need. In fact, I'd argue that the current situation is more insecure, because it is an ill-defined backchannel instead of something formalized.
Regarding the audio issue, I think this hits up a greater issue. Browsers should have a permission dialogue for things like audio and video that work on a per-domain basis so you can control that behavior. Sometimes you want to have background audio from pages. Most of the time, it's annoying. Asking would fix that problem, even when the user initiates a touch event.
"Oh, and speaking of sound: on iOS, you flat-out cannot play sound unless somewhere higher up on the call stack is a touch gesture. Asynchronous sounds can't be done using the HTML5 audio tag, because... Apple are dicks, I guess?"
I'm fairly sure this is actually because I don't want a web page on my iPhone making sounds without going through notification preferences, and I'm the one that paid Apple, not the person who made the web page. ;)