[Webkit-unassigned] [Bug 198040] getDisplayMedia can fail when called from a user gesture handler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 21 02:41:22 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=198040

--- Comment #3 from philipp.weissensteiner at visocon.com ---
Hi! Thanks for the quick response.

Let's say we want to build a screen sharing app where we mix the
camera and the screen stream.
We'd have a button "share screen" and invoke the two .getMedia
functions in a handler.
Is that handler function not a "user gesture handler"?

My main concern is that "user gesture handler" is ambiguous.
Can you clarify what a user gesture handler is and why the example
code I posted,
doesn't qualify as such?

If I invoke a different Promise instead of getUserMedia or enumarteDevices, e.g:

const examplePromise = () => {
  return new Promise(res => window.setTimeout(() => res(), 500));
};

A subsequent call to getDisplayMedia works just fine, but increasing
the delay to 1s causes the error message too.

The work-around is viable, but I'd it's still consider it a "work-around".
It's not clear why you'd have to invoke gDM before gUM, right?
I'd probably have to add a comment "order is important here!" so I
won't forget it in 6 months :).

(As far as enumarteDevices goes, that was just an example).

Hope that clarifies my issue.

-- 
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/20190521/df9638bd/attachment-0001.html>


More information about the webkit-unassigned mailing list