W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > September 2016

Re: [mediacapture-main] Allow ondevicechange to be fired before permission is granted or any device is opened

From: Martin Thomson via GitHub <sysbot+gh@w3.org>
Date: Thu, 29 Sep 2016 02:13:54 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-250352996-1475115232-sysbot+gh@w3.org>
Here's a more concrete suggestion:

Require that changes to the set of enumerated devices is delayed, and 
that the result of enumerateDevices is cached for the same period.  
This need not be a significant time, just enough to create some 
uncertainty about cross-origin correlation.  This time should be 
reduced, perhaps to zero, for both origins with `list-devices` 
permissions as well as any foreground top-level browsing context (on 
the basis that connecting a device is analogous to a key stroke in 
this case).

Personally, I would only make the event/change available immediately 
to a foreground site and let the rest wait.  You might want to reduce 
the delay when switching tabs if the delay is significant.

I will note that this has a fairly obvious workaround/attack if it is 
poorly implemented: reload or make a new realm and call 
enumerateDevices to get a new value.  Thus, any timing information 
needs to be stored for origins (and periodically cleansed).

GitHub Notification of comment by martinthomson
Please view or discuss this issue at 
 using your GitHub account
Received on Thursday, 29 September 2016 02:14:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:30 UTC