[Webkit-unassigned] [Bug 179964] Camera/microphone acquisition false positive after receiving phone call

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 20 04:41:35 PST 2017


--- Comment #4 from daginge at confrere.com ---
Based on what I've been observing, it seems like the following is happening here:

1. On the initial getUserMedia call, you will get a reference to audio and video resources (only one process may have this at any point in time).
2. On subsequent getUserMedia calls, the reference to the media resource is re-used.
3. If another process steals the resource (audio and/or video), the reference that Safari has will fail, and would have to be requested again. However, this is never checked by Safari, and it simply returns with the reference which now does not have access anymore to read from the resource.
4. Subsequent getUserMedia calls will not fix this, as it will detect the old reference and think it has permission to read from the media resource.

I suspect that closing the tab and trying again will make it work, as it seems from my tests that the permissions are granted on a per-tab basis, instead of for all of Safari. This will also explain why requesting media from a new tab on iOS will break capturing of media in the old tab (and make that tab never work with getUserMedia again).

I do not know of a workaround from JavaScript to fix this unfortunately. Perhaps youenn has some details?

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171220/6cedbfde/attachment.html>

More information about the webkit-unassigned mailing list