Use fake UI for media stream #143
Closed
hunterpollpeter wants to merge 1 commit from
use-fake-ui-flag into master
pull from: use-fake-ui-flag
merge into: gh-obsproject:master
gh-obsproject:master
gh-obsproject:archive/20261011T065042Z-force/pull/546
gh-obsproject:archive/20261007T214921Z-force/pull/539
gh-obsproject:archive/20260923T145539Z-rescue/blastorg/fix/source_tearing
gh-obsproject:archive/20260923T145539Z-rescue/SoprachevAK/fix/browser-premultiplied-srgb-blending
gh-obsproject:archive/20260923T145539Z-rescue/Arkkis/media-access-checkbox
gh-obsproject:archive/20260923T145539Z-rescue/WizardCM/inspect-browser-source
gh-obsproject:archive/20260923T145539Z-rescue/PatTheMav/browser-focus-fix
gh-obsproject:archive/20260923T145539Z-rescue/fauxnik/source-visibility
gh-obsproject:archive/20260923T145539Z-rescue/exeldro/browser_signal
gh-obsproject:archive/20260923T145539Z-rescue/exeldro/browser_size
gh-obsproject:archive/20260923T145539Z-rescue/tytan652/proc_handler_api
gh-obsproject:2.23.x
gh-obsproject:archive/20260923T145539Z-rescue/tt2468/fix/browser-logging
gh-obsproject:archive/20260923T145539Z-rescue/alyssais/zoom
gh-obsproject:2.22.x
gh-obsproject:hack-and-a-half
gh-obsproject:on-accelerated-paint2
gh-obsproject:archive/20260923T145539Z-rescue/cg2121/browser-defaults
gh-obsproject:test
gh-obsproject:archive/20260923T145539Z-rescue/tags/20.3.8.603
gh-obsproject:archive/20260923T145539Z-rescue/tags/20.2.28.571
gh-obsproject:archive/20260923T145539Z-rescue/tags/20.2.13.559
gh-obsproject:archive/20260923T145539Z-rescue/tags/20.2.14.563
gh-obsproject:archive/20260923T145539Z-rescue/tags/20.2.3.551
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.12.17.537
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.10.24.511
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.10.16.502
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.10.14.499
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.9.21.487
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.9.21.483
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.9.18.466
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.9.8.457
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.8.19.444
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.7.14.421
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.7.1.416
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.6.17.410
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.6.7.407
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.6.7.401
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.5.29.397
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.5.29.398
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.5.27.394
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.5.26.390
gh-obsproject:qt-message-pump
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.4.21.384
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.3.17.363
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.3.13.359
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.3.13.356
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.3.8.351
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.3.6.348
gh-obsproject:archive/20260923T145539Z-rescue/StreamElements/flush_cookies_on_exit
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.3.6.346
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.2.26.339
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.2.18.331
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.2.12.327
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.2.10.323
gh-obsproject:panel-update-final
gh-obsproject:panel-update
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.1.28.319
gh-obsproject:audio_support
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.1.8.305
gh-obsproject:archive/20260923T145539Z-rescue/tags/19.1.6.301
gh-obsproject:archive/20260923T145539Z-rescue/tags/18.12.25.297
gh-obsproject:archive/20260923T145539Z-rescue/tags/18.8.21.183
gh-obsproject:archive/20260923T145539Z-rescue/tags/18.8.8.165
gh-obsproject:archive/20260923T145539Z-rescue/tags/18.8.2.151
gh-obsproject:archive/20260923T145539Z-rescue/tags/18.7.25.133
gh-obsproject:osx
No reviewers
Labels
Clear labels
area/accessibility
Improves accessibility of the program
area/dependency
Issue is in external library or dependency, not OBS itself
Confirmed
Crash Report
Delayed
Merging has been delayed due to an issue
Design Issue
There is an issue with incorporating this pull request's design. It may take some time to finalize.
Duplicate
Feedback required
Issue does not contain enough information or is missing the template
Good first issue
New to contributing to OBS? Start here!
kind/bug
Categorizes issue or PR as related to a bug.
kind/cleanup
Non-breaking change which makes code smaller or more readable
kind/enhancement
Enhancements are not bugs or new features but can improve usability or performance.
platform/linux
platform/macos
platform/windows
priority/high
This is an important PR
Question
Request for Comments
More feedback & discussion is requested
Seeking Other Contributors
This PR needs help from any other developers who are willing to give a crack at this code
Seeking Testers
Won't Fix / By Design
No labels
area/accessibility
area/dependency
Confirmed
Crash Report
Delayed
Design Issue
Duplicate
Feedback required
Good first issue
kind/bug
kind/cleanup
kind/enhancement
platform/linux
platform/macos
platform/windows
priority/high
Question
Request for Comments
Seeking Other Contributors
Seeking Testers
Won't Fix / By Design
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
gh-obsproject/obs-browser!143
Loading…
Reference in a new issue
No description provided.
Delete branch "use-fake-ui-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Use fake UI for media stream avoids the need to grant camera/microphone permissions.
Fixes #146
Any word on getting this merged? @DDRBoxman @jp9000
While I don't necessarily disagree with this feature being enabled, can you describe your use case for this?
I need this so I can use a microphone audio source and render a visualizer. Similar to what you see here:
https://codepen.io/zapplebee/pen/gbNbZE
@hunterpollpeter Do you happen to have a compiled version of this so I can give it a try? I don't have everything setup to compile all of this yet. @dodgepong is there other options for passing in command line switches instead of having to change the source every time something like this comes up?
Just realized that the command lines from OBS are passed in to the browser source. So although this would be a good addition I see it being more safe to pass in the parameter. Having it built in could allow a rogue page to listen in to a user's input device with out them being aware.
I agree this should be opt-in rather than the norm. As OBS passes flags to the browser source, this particular change shouldn't be merged.
My use case is creating overlays that use the webcam from the browser source itself. The idea is to make it easier for less technically inclined people to have an overlay with populated data.
I do see how this can be exploited and maybe hardcoding the flag isn't the best option. Would it be a better solution to make this an option on the browser-source configuration window? Or maybe even a preference within the application? Thanks for the discussion!
I agree this would be best as an option in each source. "Allow this page to access audio/video devices, and my display"
I need this feature to make face masks plugin with browser, not with separate dll which is hard to install.
Been having issues with arguments like
--enable-media-streamand--use-fake-ui-for-media-streamnot working for browser sources when passed in v26. Has there been any traction on this PR in the past year or so? And if the option lies in each browser source properties, how would we be able to enable this for browser docks?@eliasthompson
Can you provide a reproducible test case? What specific platform/OS and what specific version of OBS? What exactly are you trying to do, what is happening, and what do you expect to happen? Though, this conversation should probably start in one of our support channels and be filed as its own issue if the flags are somehow not working as intended. I'd rather this PR discussion stay focused on the merits of whether this PR should be merged or not.
No, there has been no movement on this PR. Per @WizardCM 's comment above:
And his other comment:
We pass all user-specified flags to CEF. I agree that we should not enable this flag by default for all users.
You wouldn't, as far as I know. Switches passed to CEF affect the process/application from startup to close. I don't think they can be selectively applied to different tabs/windows (browser sources or browser panels, in our case).
Between the fact that we don't want to universally allow browser sources to automatically capture a user's audio or video without permission and the fact that a user can already pass any flag to CEF via an application shortcut, I'm in favor of closing this.
Yeah I didn't mean to derail the discussion with my own issues, I'll post those in the appropriate channels if they persist.
In terms of the PR, yeah, if the only way it works is by global enabling it for the during that the program is run, then not enabling it by default is the right call imo and the PR should be closed. But if there is any way that it can be set/manipulated while the program is running, I'd be highly in favor of some sort of GUI solution.
As far as I know, all CEF switches/flags are global. There are some, like hardware acceleration, that we can check the value of and then do other things like create UI elements. This, however, is a flag that bypasses a user permission dialog and prevents it from being displayed and automatically uses default audio and video devices for media streams. I don't know of a way we could intercept the functionality and change it on a per source basis.
Per conversation with @WizardCM about unaddressed concerns, I'm going to close this PR.
Pull request closed