From 9e4fc9eb73605488c487ad0c7b416d643d9ecefe Mon Sep 17 00:00:00 2001 From: ZyanKLee Date: Thu, 22 Aug 2019 19:44:12 +0200 Subject: [PATCH 1/2] allow for "linuxbrowser_source" to be controlled based on the request at https://github.com/bazukas/obs-linuxbrowser/issues/46 I did a quick search for the string "browser_source" and these seem to be the only two occurrences. Enhancing the conditional with the identifier of the obs-linuxbrowser plugin, this should solve the problem. As I'm currently not at home, I can't verify this does what it should, but I will test it later tonight. @mjc666 if you are still interested please give it a test run to verify if these two plugins work together now. --- src/WSRequestHandler_Sources.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WSRequestHandler_Sources.cpp b/src/WSRequestHandler_Sources.cpp index b48bd9b1..3242cad7 100644 --- a/src/WSRequestHandler_Sources.cpp +++ b/src/WSRequestHandler_Sources.cpp @@ -923,7 +923,7 @@ HandlerResponse WSRequestHandler::HandleGetBrowserSourceProperties(WSRequestHand } QString sourceId = obs_source_get_id(source); - if (sourceId != "browser_source") { + if (sourceId != "browser_source" && sourceId != "linuxbrowser_source") { return req->SendErrorResponse("not a browser source"); } @@ -969,7 +969,7 @@ HandlerResponse WSRequestHandler::HandleSetBrowserSourceProperties(WSRequestHand } QString sourceId = obs_source_get_id(source); - if(sourceId != "browser_source") { + if(sourceId != "browser_source" && sourceId != "linuxbrowser_source") { return req->SendErrorResponse("not a browser source"); } From b25d8d8201d2576fc0908770a40f75d0213a2703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Mon, 26 Aug 2019 21:01:05 +0200 Subject: [PATCH 2/2] requests(sources): fix linux browser source id --- src/WSRequestHandler_Sources.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WSRequestHandler_Sources.cpp b/src/WSRequestHandler_Sources.cpp index 3242cad7..4efa77da 100644 --- a/src/WSRequestHandler_Sources.cpp +++ b/src/WSRequestHandler_Sources.cpp @@ -923,7 +923,7 @@ HandlerResponse WSRequestHandler::HandleGetBrowserSourceProperties(WSRequestHand } QString sourceId = obs_source_get_id(source); - if (sourceId != "browser_source" && sourceId != "linuxbrowser_source") { + if (sourceId != "browser_source" && sourceId != "linuxbrowser-source") { return req->SendErrorResponse("not a browser source"); } @@ -969,7 +969,7 @@ HandlerResponse WSRequestHandler::HandleSetBrowserSourceProperties(WSRequestHand } QString sourceId = obs_source_get_id(source); - if(sourceId != "browser_source" && sourceId != "linuxbrowser_source") { + if(sourceId != "browser_source" && sourceId != "linuxbrowser-source") { return req->SendErrorResponse("not a browser source"); }