flathub / com.obsproject.Studio

This repository is no longer used to build OBS. Issues should be reported at https://github.com/obsproject/obs-studio
https://github.com/obsproject/obs-studio
29 stars 19 forks source link

Package browser plugin #53

Closed tinywrkb closed 3 years ago

tinywrkb commented 4 years ago

Please enable browser plugin which is now can be enabled for Linux target. obsproject/obs-studio#1759 https://github.com/obsproject/obs-studio/blob/25.0.1/plugins/CMakeLists.txt#L51

TingPing commented 4 years ago

It will require building CEF which is a challenge in itself.

TingPing commented 4 years ago

You can try this hacky solution btw: https://github.com/flathub/com.obsproject.Studio/wiki/Linux-Browser-Plugin

tinywrkb commented 4 years ago

Thanks, I'm already using the linked binary release but I suspect this might break in the future. I guess that in that case, I could download the deb package from the official obs apt repo and extract the plugin.

aleixpol commented 4 years ago

There's these things too, not much development though: https://github.com/lulou/obs-qtwebengine https://github.com/bazukas/obs-qtwebkit

We have QtWebEngine and QtWebKit easily available so it might be worth a shot?

TingPing commented 4 years ago

Upstream already seems antsy about us shipping a non-default plugin and a web engine plugin, that is clearly unmaintained btw, is probably the buggiest possible thing to ship so I wouldn't want to do that by default.

Coming up with an extension point would be nice but likely needs patching OBS and whatnot.

zhoreeq commented 3 years ago

Would really love to see this. Any updates?

tinywrkb commented 3 years ago

@TingPing, what about using the pre-built CEF release? something like this seems to work

diff --git a/com.obsproject.Studio.json b/com.obsproject.Studio.json
index 1004189..c3e8ed4 100644
--- a/com.obsproject.Studio.json
+++ b/com.obsproject.Studio.json
@@ -225,6 +225,28 @@
         }
       ]
     },
+    {
+      "name": "cef",
+      "buildsystem": "cmake",
+      "make-args": [
+        "libcef_dll_wrapper"
+      ],
+      "no-make-install": true,
+      "post-install": [
+        "mkdir -p /app/lib/cef",
+        "cp -r . /app/lib/cef/"
+      ],
+      "sources": [
+        {
+          "type": "archive",
+          "url": "http://opensource.spotify.com/cefbuilds/cef_binary_75.1.14%2Bgc81164e%2Bchromium-75.0.3770.100_linux64.tar.bz2",
+          "sha256": "06109bab25d2526cc2a98101c6341a48c3ff270b11418903fb29378bfc3ad3d1"
+        }
+      ],
+      "cleanup": [
+        "*"
+      ]
+    },
     {
       "name": "obs",
       "buildsystem": "cmake-ninja",
@@ -237,7 +259,9 @@
         "-DDISABLE_JACK=ON",
         "-DENABLE_PULSEAUDIO=ON",
         "-DWITH_RTMPS=ON",
-        "-DOBS_VERSION_OVERRIDE=26.0.2"
+        "-DOBS_VERSION_OVERRIDE=26.0.2",
+        "-DBUILD_BROWSER=ON",
+        "-DCEF_ROOT_DIR=/app/lib/cef"
       ],
       "post-install": [
         "install -d /app/lib/blackmagic /app/lib/ndi /app/lib/v4l2sink",
GeorgesStavracas commented 3 years ago

I've been investigating this as part of https://github.com/obsproject/obs-studio/pull/3804, but it needs more testing. It current can conflict with the Flathub Beta branch because Chromium needs the Ozone / Wayland platform to operate on Wayland properly.

suciptoid commented 3 years ago

@GeorgesStavracas smooth on fedora 33 Screenshot from 2020-12-30 22-37-53

TiZ-HugLife commented 3 years ago

While I was dinking around with adding plugins anyways, I tried adding @tinywrkb's changes to the manifest and they resulted in a working browser source. I won't include that in my pull request unless we think that's a good enough solution.

tinywrkb commented 3 years ago

Closed by https://github.com/flathub/com.obsproject.Studio/commit/73f23dd8fba399b224856d58578cc6aa17305f05