Skip to content

Add per-source camera and microphone permission - #530

Open
Arkkis wants to merge 1 commit into
obsproject:masterfrom
Arkkis:media-access-checkbox
Open

Add per-source camera and microphone permission#530
Arkkis wants to merge 1 commit into
obsproject:masterfrom
Arkkis:media-access-checkbox

Conversation

@Arkkis

@Arkkis Arkkis commented Jul 28, 2026

Copy link
Copy Markdown

Description

Added checkbox to browser source to allow browser to access camera and microphone.
image

Motivation and Context

This allows usage of cameras and microphones via browser source easier than using launch flag: --enable-media-stream

How Has This Been Tested?

This has been tested by building OBS Studio locally, and used webcam embedded web page for testing.

OS: CachyOS x86_64
Kernel: Linux 7.1.4-1-cachyos
Camera: Elgato Facecam MK2
OBS Studio Source version: 32.2.1

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@Arkkis
Arkkis force-pushed the media-access-checkbox branch from fa713dc to 0fd6c79 Compare July 28, 2026 11:51
@Arkkis Arkkis changed the title browser-source: media access checkbox Add per-source camera and microphone permission Jul 28, 2026
Checkbox that allows browser source to capture camera of microphone
sources. This has to be set per-source, while launch flags work globally.
CEF permission handler is used to get per-source limitation.
Using --enable-media-stream flag still overrides this so compatibility
remains.
@Arkkis
Arkkis force-pushed the media-access-checkbox branch from 0fd6c79 to 130874e Compare July 28, 2026 12:24
@Arkkis
Arkkis marked this pull request as ready for review July 28, 2026 12:25
@WizardCM

WizardCM commented Jul 28, 2026

Copy link
Copy Markdown
Member

@Warchamp7 Would you prefer this as-is, or a dropdown similar to Page permissions, allowing the user to choose from something like

None
Audio only (microphone, etc)
Video only (display, webcam, window, etc)
Audio and video

WizardCM@83b9929

Or some other implementation.

@Warchamp7

Copy link
Copy Markdown
Member

I'd like to know more about the use cases this is for first.

@Arkkis

Arkkis commented Jul 28, 2026

Copy link
Copy Markdown
Author

I'd like to know more about the use cases this is for first.

My own usecase is to use webcam in web app running inside browser source.
It's not possible currently without global flag so using this kind of web app is harder for user to take into use.

@Warchamp7

Copy link
Copy Markdown
Member

I'd like to know more about the use cases this is for first.

My own usecase is to use webcam in web app running inside browser source. It's not possible currently without global flag so using this kind of web app is harder for user to take into use.

What sort of web app? Basically why is this needed in OBS versus simply capturing an actual proper browser instead?

@Arkkis

Arkkis commented Jul 28, 2026

Copy link
Copy Markdown
Author

I'd like to know more about the use cases this is for first.

My own usecase is to use webcam in web app running inside browser source. It's not possible currently without global flag so using this kind of web app is harder for user to take into use.

What sort of web app? Basically why is this needed in OBS versus simply capturing an actual proper browser instead?

Since it's webcam overlay, I think browser source is better fit than capturing browser when you can just drop link into OBS and it works right away. This is simply the easiest experience for user.

@Warchamp7

Copy link
Copy Markdown
Member

I'd like to know more about the use cases this is for first.

My own usecase is to use webcam in web app running inside browser source. It's not possible currently without global flag so using this kind of web app is harder for user to take into use.

What sort of web app? Basically why is this needed in OBS versus simply capturing an actual proper browser instead?

Since it's webcam overlay, I think browser source is better fit than capturing browser when you can just drop link into OBS and it works right away. This is simply the easiest experience for user.

What sort of webcam overlay? Can you please provide an actual example?

@Arkkis

Arkkis commented Jul 28, 2026

Copy link
Copy Markdown
Author

I'd like to know more about the use cases this is for first.

My own usecase is to use webcam in web app running inside browser source. It's not possible currently without global flag so using this kind of web app is harder for user to take into use.

What sort of web app? Basically why is this needed in OBS versus simply capturing an actual proper browser instead?

Since it's webcam overlay, I think browser source is better fit than capturing browser when you can just drop link into OBS and it works right away. This is simply the easiest experience for user.

What sort of webcam overlay? Can you please provide an actual example?

There you go (WIP): https://efekti.arkkis.com/studio

@Warchamp7

Copy link
Copy Markdown
Member

There you go (WIP): https://efekti.arkkis.com/studio

I'm still not seeing a reasonable justification for why this needs to be implemented as a browser source instead of a separate page or even standalone app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants