RESOLVED DUPLICATE of bug 214262 214268
iOS 14 Beta - getUserMedia MediaStream ends when attached to two video elements
https://bugs.webkit.org/show_bug.cgi?id=214268
Summary iOS 14 Beta - getUserMedia MediaStream ends when attached to two video elements
tmendoza
Reported 2020-07-13 13:02:24 PDT
In the iOS 14 Beta, video captured with getUserMedia fails when attached to two video elements. To reproduce, visit this site: https://ios14-webkit-video.glitch.me/ When you click on the "Use getUserMedia" button, getUserMedia will be called and the stream will be attached to a <video> element in the DOM. The video will function properly. When you refresh the page and click on the "Use getUserMedia with dummy element" button, getUserMedia will be called and the stream will be attached to both a <video> element in the DOM and a second <video> element that is not attached to the DOM. This will fail. The video may appear for a moment, but it soon disappears as the underlying MediaStreamTrack ends (see the console to see when the 'ended' event fires). What is odd is that the video will function properly if the dummy element is appended to the DOM (so that two videos are visible). When the dummy element is not appended to the DOM, the problem occurs. Source code: https://glitch.com/edit/#!/ios14-webkit-video?path=script.js This issue will impact users of the Twilio Video platform (and possibly other WebRTC platforms). The Twilio Video Javascript SDK uses these 'dummy elements' as a way of listening to the 'canplay' event of the <video> element. With this implementation, Twilio users will be unable to capture their local video in iOS 14 as this issue impacts the use of the Twilio.Video.createLocalTracks() function.
Attachments
Alexey Proskuryakov
Comment 1 2020-07-14 22:52:36 PDT
Could you please confirm whether this works in latest shipping version?
Radar WebKit Bug Importer
Comment 2 2020-07-14 22:52:45 PDT
tmendoza
Comment 3 2020-07-15 11:30:14 PDT
(In reply to Alexey Proskuryakov from comment #1) > Could you please confirm whether this works in latest shipping version? Hi Alexey, The issue is present in build 18A5319i of the iOS 14 beta. Is there a more recent version that I should be using? This problem does not occur in any iOS 13 version.
Alexey Proskuryakov
Comment 4 2020-07-15 11:55:28 PDT
Thank you. My question was about whether this worked as expected in iOS 13, which you did answer.
youenn fablet
Comment 5 2020-07-22 03:10:05 PDT
Thanks Tim, I reproed the issue.
youenn fablet
Comment 6 2020-07-22 03:34:03 PDT
Reproed on iPhone, not iPad. But issue reproduces if just trying to render in a detached video element: https://jsfiddle.net/dn5xp08o/
youenn fablet
Comment 7 2020-07-22 03:34:30 PDT
(In reply to youenn fablet from comment #6) > Reproed on iPhone, not iPad. For https://ios14-webkit-video.glitch.me/. > But issue reproduces if just trying to render in a detached video element: > https://jsfiddle.net/dn5xp08o/ On both iPhone and iPad.
youenn fablet
Comment 8 2020-07-23 01:53:32 PDT
*** This bug has been marked as a duplicate of bug 214262 ***
tmendoza
Comment 9 2020-07-23 14:45:57 PDT
(In reply to youenn fablet from comment #8) > > *** This bug has been marked as a duplicate of bug 214262 *** Hi Youenn, Bug 214262 has been marked as fixed. Do you know if the fix is in Beta 3 (18A5332f)? I can still reproduce the issue in this version.
youenn fablet
Comment 10 2020-07-23 14:52:14 PDT
(In reply to tmendoza from comment #9) > (In reply to youenn fablet from comment #8) > > > > *** This bug has been marked as a duplicate of bug 214262 *** > > Hi Youenn, > > Bug 214262 has been marked as fixed. Do you know if the fix is in Beta 3 > (18A5332f)? I can still reproduce the issue in this version. It is not yet available in any beta.
Anna Vasilko
Comment 11 2020-07-23 16:02:03 PDT
Hi Youenn, Should we anticipate the fix being included in the next Beta4?
Kenta Kato
Comment 12 2020-09-03 16:51:29 PDT
This problem seemed to be resolved in beta6, thanks for the fix!
Note You need to log in before you can comment on or make changes to this bug.