| Summary: | REGRESSION: getUserMedia video does not display correctly if acquired immediately after stopping previous stream | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Sergey Tatarintsev <sergey.t> | ||||
| Component: | WebRTC | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | NEW --- | ||||||
| Severity: | Normal | CC: | davy.de.durpel, eric.carlson, jer.noble, marcel, smoley, webkit-bug-importer, youennf | ||||
| Priority: | P2 | Keywords: | HasReduction, InRadar | ||||
| Version: | Safari 14 | ||||||
| Hardware: | Mac | ||||||
| OS: | macOS 10.15 | ||||||
| Attachments: |
|
||||||
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. 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. (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 Did a small experiment by setting playsInline to true. I had to call camera.play() to make it work. 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. |
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.