Closed Bug 1750552 Opened 3 years ago Closed 3 years ago

media.navigator.streams.fake is not working 97 beta

Categories

(Core :: WebRTC, defect)

Firefox 97
defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: szimapet, Unassigned)

References

(Regression)

Details

(Keywords: regression)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36

Steps to reproduce:

I've set the media.navigator.streams.fake to true but it does not work.

Actual results:

It still ask for webcam permission.

Expected results:

It should not ask for permission. It workes in 96 and prior.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Component: Audio/Video: Playback → WebRTC

Hi there. That pref and the fake devices it enables help with internal testing. As of bug 1732409 comment 21, we separated out the part that bypasses permission prompts from this pref since that's separately controllable using media.navigator.permission.disabled.

The two prefs are now orthogonal, making it easier to reason about this important code and the tests that set them, e.g. when we test our permission prompts for instance.

I don't think it occurred to us that people were setting this pref in the wild. May I ask for what purpose?

Workaround

You should be able to work around this by setting both

media.navigator.streams.fake = true
media.navigator.permission.disabled = true

⚠️ Just be careful to always flip them together, otherwise the latter may give sites unprompted access to your devices. 😮

Hope that works, and sorry for the inconvenience but these were never meant to be a privacy feature.

Flags: needinfo?(szimapet)
Regressed by: 1732409
Has Regression Range: --- → yes

Hi, thank you, the "media.navigator.permission.disabled" solved the problem :)

Our site uses webcams for emotion recognition and we use these settings for automated tests with browserstack.

By the way, if you could add a feature to let us pass a video file as a webcam stream that would be awsome :D, like the "use-file-for-fake-video-capture" flag.

Flags: needinfo?(szimapet)
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
Resolution: WORKSFORME → WONTFIX
You need to log in before you can comment on or make changes to this bug.