[webcontent] Camera switching bug when remembering decision for site
Categories
(Core :: WebRTC: Audio/Video, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox98 | --- | fixed |
People
(Reporter: kbrosnan, Assigned: jib)
References
(Blocks 1 open bug)
Details
Attachments
(5 files)
From github: https://github.com/mozilla-mobile/fenix/issues/22704.
Site with issue and any steps to reproduce
The following issue happens when toggling between cameras and telling Firefox to remember decision for this site.
It can be tested in the following example: https://codepen.io/mozmorris/pen/mddvKBE (this is not my code, but has the same issue I have in my own code that is not publicly available).Expected behavior
When using the example and pressing the Switch camera button, the camera is supposed to switch between facing modes. When not remembering the decision, this functionality works properly, but once you selected remember it will crash and give the following error:
Error: DOMException: Starting videoinput failedActual behavior
Once remembered, the view crashes and the following error is thrown in the console: Error: DOMException: Starting videoinput failed
Does toggling Tracking Protection fix the issue? (Press the shield icon in the toolbar while on the site to see toggle)
No, this does not fix the issue
Can you reproduce in Chrome (or other non-Mozilla browser)?
No, in Chrome and Safari this is not an issue. The camera switching is done properly.
Device information
- Android device: Google pixel 4a (but I can confirm this is also not working on other android devices)
- Fenix version: 94.1.2
Change performed by the Move to Bugzilla add-on.
Assignee | ||
Comment 1•3 years ago
|
||
Hi Kevin, are you able to reproduce using the codepen in comment 0? — It WFM on my old Samsung S9.
If you're able to reproduce, which device(s) does it crash on (crash link?), and does it also repro using https://jsfiddle.net/jib1/fsexmu8v/ ?
Reporter | ||
Comment 2•3 years ago
|
||
I was going on Laurentiu Apahidean's confirmation of the problem. Redirect.
Comment 3•3 years ago
|
||
I wasn't able to reproduce the crash only the fact that the image becomes still when switching cameras.
Device used:
OnePlus 6T (Android 9)
Comment 4•3 years ago
|
||
The severity field is not set for this bug.
:jib, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 5•3 years ago
|
||
Hi Laurentiu, does it repro with https://jsfiddle.net/jib1/fsexmu8v/show ?
Comment 6•3 years ago
|
||
I managed to reproduce the issue on the latest Firefox Preview Nightly 2022-01-05 using a OnePlus 6T (Android 9). After switching camera several times without selecting the remember option and eventually selecting it the AbortError: Starting videoinput failed error message is displayed when trying to switch cameras.
Assignee | ||
Comment 7•3 years ago
|
||
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
Assignee | ||
Comment 9•3 years ago
|
||
Hi Laurentiu, would you mind trying this build (ARM, AArch64) from comment 8 to see if it fixes it?
Note since there's no ☑ Remember this decision
in the GeckoView example app UX, you'll need to first go to about:config
and set media.navigator.permission.disabled
to true.
Comment 10•3 years ago
|
||
I tested the issue on a OnePlus 6T (Android 9) using the GeckoView example builds and the issue still occurs. The AbortError: Starting videoinput failed error message is still displayed when trying to switch cameras.
Assignee | ||
Comment 11•3 years ago
|
||
There's a chance my fix in comment 9 was no good. Laurentiu, would you mind trying again with the following build (ARM, AArch64)?
Comment 12•3 years ago
|
||
I tested the issue on a OnePlus 6T (Android 9) using the GeckoView example builds from Comment 11 and the issue still occurs. The AbortError: Starting videoinput failed error message is still displayed when trying to switch cameras.
Updated•3 years ago
|
Assignee | ||
Comment 13•3 years ago
|
||
Laurentiu, thank you for your patience. Could you run https://jsfiddle.net/jib1/78ba05vd/show and report back the output?
Comment 14•3 years ago
|
||
I ran https://jsfiddle.net/jib1/78ba05vd/show on the build from Comment 11 using a OnePlus 6T (Android 9) and didn't find any issues, no errors were encountered when switching camera and and the video didn't freeze.
Assignee | ||
Comment 15•3 years ago
|
||
Strange, so the 200ms delay worked in that case. Maybe it's worth landing the patch after all then. Odd that the try builds didn't have the same effect. Sometimes the gecko example builds don't install properly unless previous versions are deleted first...
Comment 16•3 years ago
|
||
Comment 17•3 years ago
|
||
bugherder |
Comment 18•2 years ago
|
||
Although I can see that Firefox is not crashing anymore, I am still having issues with this.
It works fine, until it doesn't anymore. so like, first camera works, and then switching camera requires me ask permission again which should not be the case, but anyway, after switching through them all, one of the cameras fails to retrieve the stream, and once that one fails, all of the cameras seems to fail after that. And this happens with both asking permissions for every single camera, and with the "remember decision" option on...
Description
•