NEW216874
REGRESSION: getUserMedia video does not display correctly if acquired immediately after stopping previous stream
https://bugs.webkit.org/show_bug.cgi?id=216874
Summary REGRESSION: getUserMedia video does not display correctly if acquired immedia...
Sergey Tatarintsev
Reported 2020-09-23 06:11:18 PDT
Created attachment 409467 [details] Test case reduction If navigator.mediaDevices.getUserMedia called the second time immediately after the closing the previous camera screen, the call succeeds, but the resulting stream does not display correctly: - assigning it to srcObject of the video element does not start the playback - said video element does not emit any events Adding ~500ms delay between closing the previous stream and starting the next one fixes the problem. It also worked correctly without a delay on Desktop Safari 13. See attachment for reproduction. Expected result: camera stream is playing in the video element.
Attachments
Test case reduction (789 bytes, text/html)
2020-09-23 06:11 PDT, Sergey Tatarintsev
no flags
Radar WebKit Bug Importer
Comment 1 2020-09-23 11:30:29 PDT
Smoley
Comment 2 2020-09-24 17:43:16 PDT
Using the attached test case I am not able to reproduce this issue on Safari Technology Preview Release 113 (Safari 14.0.1, WebKit 15610.2.3.1). I see the LED indicator flash as the first stream ends and the second begins but the resulting stream seems normal.
Davy De Durpel
Comment 3 2020-10-07 06:45:12 PDT
I did these 3 tests: Safari 14 (15610.1.28.1.9) on MacOS 10.15.7 -> no issue Safari 14 on iPadOS 14.2 (latest public beta) -> no issue Safari 14 on iOS 14.0.1 -> black stream So it seems that the issue currently only exists on iOS 14 and not the 2 other operating systems.
youenn fablet
Comment 4 2020-10-07 09:53:46 PDT
(In reply to Davy De Durpel from comment #3) > I did these 3 tests: > > Safari 14 (15610.1.28.1.9) on MacOS 10.15.7 > -> no issue > > Safari 14 on iPadOS 14.2 (latest public beta) > -> no issue > > Safari 14 on iOS 14.0.1 > -> black stream > > > So it seems that the issue currently only exists on iOS 14 and not the 2 > other operating systems. This might be a playsInline bug. Can you fix your test case to use it? Currently it is set as playsline
youenn fablet
Comment 5 2020-10-07 09:57:27 PDT
Did a small experiment by setting playsInline to true. I had to call camera.play() to make it work.
youenn fablet
Comment 6 2020-10-07 10:11:35 PDT
It seems there might be a small amount of time where the session is interrupted and we do not transition automatically to play from autoplay.
Note You need to log in before you can comment on or make changes to this bug.