Skip to content

Update Desktop to support the new mac virtual camera system extension #5446

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: staging
Choose a base branch
from

Conversation

sandboxcoder
Copy link
Contributor

@sandboxcoder sandboxcoder commented Jun 12, 2025

Description

Updates desktop to download the new 'virtual cam system extension', compile it using cmake, and package it within the final Streamlabs Desktop.app at the Contents/Library/SystemExtensions path so it can be codesigned and notarized on the release agent. Our SLOBS build agents do not have the certificate present there. This is why Desktop is downloading source code when a build is initiated via yarn package:mac or yarn package:mac-arm64. When Desktop is codesigned on the release agent, this new virtual camera system extension will be as well. This works around the restriction that XCode will not allow a System extension to be compiled unless it is codesigned.

Added macVirtualCamVersion to package.json. This is the git tag that will be utilized to download the camera system extension

Motivation and Context

The former legacy DAL plugin was deprecated by Apple. Enabled the mac obs30 virtual camera to be used with Streamlabs Desktop. This way we are using the same implementation as obs.

Known Issue

Atm, users can only uninstall the legacy DAL plugin when they click the button. It is not possible to uninstall a mac system extension from an app unless Apple adds that capability (granted, its currently possible if user disables SIP but don't think it's worth persuing that). We are consistent with OBS in that regard. Users have to manually uninstall it. So clicking the uninstall button will attempt to uninstall the DAL plugin always.

How Has This Been Tested?

  • Since I am unable to codesign Streamlabs desktop with the system extension installation entitlement enabled, I built SLOBS.app with codesign enabled so it could install the system extension. This exact same code will be executed by the Streamlabs Desktop.app so in theory it should all work?
  • In Streamlabs-Desktop, verified this works in non-codesigned builds.
  • Tested mostly outside of app bundles via the VIRTUALCAM_BYPASS_SYSTEM_CHECK environment var (as described in my slobs pull request).
  • I could not test a codesigned build. If I attempt to codesign it with my local Apple Developer cert I will get an invalid codesign error because I enabled the system extension installation entitlement. This issue seems unique to attempting to codesign an app with electron-builder and unsure how to get around that atm. XCode doesnt have this issue so had to test installing the system extension there- then proceeded to test virtual cam from Desktop after it was already installed.

Hoping we can make a codesigned build on the release VM and possibly test it before its uploaded to preview? I am unable to test installing the system extension from Desktop. Should work since it will invoke the exact same code path in mac-virtualcam but cant be 100% sure this will work. However, I believe the worse case scenario is users cant install virtual cam which is OK and doesnt break the preview (cause that already doesnt work).

@sandboxcoder sandboxcoder marked this pull request as ready for review June 12, 2025 19:44
# Conflicts:
#	app/services/streaming/streaming.ts
#	package.json
#	scripts/repositories.json
* changed createVirtualCam -> installVirtualCam. Behind the scenes, they currently do
the exact samething. But it is best to change this now incase this were to change later.
* fix typescript error
* update streaming.ts and virtual-webcam.ts to share the signals callback
# Conflicts:
#	app/services/streaming/streaming.ts
#	package.json
#	scripts/repositories.json
* catch any exception thrown if cp.execSync command fails
* add more verbose logging if we fail on the release agent and need to troubleshoot
# Conflicts:
#	scripts/repositories.json
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.

1 participant