obs-studio: 31.1.2 -> 32.0.1

This commit is contained in:
Franz Pletz
2025-09-29 02:43:52 +02:00
parent 5bde53f2a8
commit 641f60cfe3
2 changed files with 5 additions and 37 deletions
@@ -1,33 +0,0 @@
From 0de0a90f8fe5e1e48fa4ec7aa7c825ef88770f9d Mon Sep 17 00:00:00 2001
From: Ryan Foster <RytoEX@gmail.com>
Date: Mon, 9 Sep 2019 23:55:02 -0400
Subject: [PATCH] Enable file access and universal access for file URLs
When loading a local file, instead of disabling CEF's web security,
enable file access and universal access for file URLs. This should allow
local files to make CORS requests without completely disabling CEF's
security model.
---
obs-browser-source.cpp | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/obs-browser-source.cpp b/obs-browser-source.cpp
index 09b3017..1094340 100644
--- a/plugins/obs-browser/obs-browser-source.cpp
+++ b/plugins/obs-browser/obs-browser-source.cpp
@@ -239,9 +239,12 @@ bool BrowserSource::CreateBrowser()
#if ENABLE_LOCAL_FILE_URL_SCHEME && CHROME_VERSION_BUILD < 4430
if (is_local) {
- /* Disable web security for file:// URLs to allow
- * local content access to remote APIs */
- cefBrowserSettings.web_security = STATE_DISABLED;
+ /* Enable file access and universal access from file://
+ * URLs to allow local content access to remote APIs */
+ cefBrowserSettings.file_access_from_file_urls =
+ STATE_ENABLED;
+ cefBrowserSettings.universal_access_from_file_urls =
+ STATE_ENABLED;
}
#endif
auto browser = CefBrowserHost::CreateBrowserSync(
@@ -59,6 +59,7 @@
libdatachannel,
libvpl,
qrcodegencpp,
simde,
nix-update-script,
extra-cmake-modules,
}:
@@ -82,21 +83,19 @@ let
in
stdenv.mkDerivation (finalAttrs: {
pname = "obs-studio";
version = "31.1.2";
version = "32.0.1";
src = fetchFromGitHub {
owner = "obsproject";
repo = "obs-studio";
rev = finalAttrs.version;
hash = "sha256-QZoIyjliVruDPZj8hzTABaDn+nCTVs5qQCdBLtSOKvI=";
hash = "sha256-99VAVV3hEMDI2R30OrX/in/9KtesUxMGOPg6yT5e4oM=";
fetchSubmodules = true;
};
separateDebugInfo = true;
patches = [
# Lets obs-browser build against CEF 90.1.0+
./Enable-file-access-and-universal-access-for-file-URL.patch
./fix-nix-plugin-path.patch
];
@@ -156,6 +155,8 @@ stdenv.mkDerivation (finalAttrs: {
++ optional browserSupport cef
++ optional withFdk fdk_aac;
propagatedBuildInputs = [ simde ];
# Copied from the obs-linuxbrowser
postUnpack = lib.optionalString browserSupport ''
ln -s ${cef} cef