[Webkit-unassigned] [Bug 252465] In PWA, HTML Video Element may be unable to play stream from 'getUserMedia()'

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 28 01:45:15 PDT 2023


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

Andre <andreheyen at web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andreheyen at web.de

--- Comment #39 from Andre <andreheyen at web.de> ---
(In reply to Chris from comment #35)
> (In reply to rooke from comment #34)
> > Just to add to the information available, and provide a detection method,
> > you can subscribe to the HTMLMediaElement's events (e.g. <video muted="true"
> > />). In a normal situation, the events follow this order:
> > 
> > play 
> > waiting 
> > loadstart 
> > progress 
> > suspend 
> > durationchange 
> > loadedmetadata 
> > loadeddata 
> > canplay 
> > playing 
> > canplaythrough
> > timeupdate (repeatedly for every frame)
> > 
> > When the PWA camera issue rears its head, the events are cut off at
> > 'suspend', i.e.:
> > 
> > play 
> > waiting 
> > loadstart 
> > progress 
> > suspend 
> > <then nothing>
> > 
> > This is the method to detect when you're in that situation. Just timeout on
> > any of the missing 'expected' events, e.g. canplay:
> > 
> > let timeoutId: NodeJS.Timeout;
> > 
> > // set timeout of 3 seconds to wait for oncanplay
> > timeoutId = setTimeout(() => {
> >   // The video didn't get to 'canplay'
> > }, yourPreferredTimeoutInMillis);
> > 
> > videoElement.oncanplay = () => {
> >   // clear the timeout because oncanplay was called
> >   clearTimeout(timeoutId);
> > };
> 
> 
> 
> This is really helpful, thank you
> 
> I’d been doing something similar already with a chained function call that
> executes after a timer is set to say the camera couldn’t be loaded. If the
> function succeeds and it progresses past “suspend” then the timer is cleared
> and the camera is displayed.
> 
> Being able to detect the problem was half the battle but obviously having an
> actual fix for this is the dream! In the meantime a work around to detect
> the issue and then get the camera working again without user input would be
> great, too…

Still not working on 16.5.1 :(

Can you show an example of your code how you fixed it with a workaround? I tried a lot but nothing worked for me.

-- 
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/20230628/4ef3deef/attachment.htm>


More information about the webkit-unassigned mailing list