Re: [mediacapture-main] Clarify when the application can retry getUserMedia after it returns "InvalidStateError" due to the window not being in focus (#763)

Ah sorry about my confusion. The `getUserMedia` promise would just not resolve until the focus requirement has been met. I think the application can handle this by showing a "camera is starting" screen, for example. This makes sense. Thanks.

The only drawback I can think of is that the application would not be able to separate the "user time" spent during the waiting for focus period, from the "system time" from actually doing the work opening the device, which the application may want to aggregate as part of product health metrics. But on the other hand `getUserMedia` may be waiting on the permissions prompt... So probably it's best to just not time it when permission prompting is involved or the application is without focus...

-- 
GitHub Notification of comment by q-alex-zhao
Please view or discuss this issue at https://github.com/w3c/mediacapture-main/issues/763#issuecomment-760576996 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 15 January 2021 01:07:35 UTC