diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-04-06 22:05:39 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-04-06 22:05:39 +0300 |
commit | 51e0ed85d09684a792837b5d9cab6d6d55ec601a (patch) | |
tree | b05b17e57da355e1ef1cfff0529653b28edbf1c4 /lib/Files | |
parent | b9422fd3a048fa6f1b8933813d097e79ca31bcd6 (diff) |
Fix missing element for Chromium screensharing extension
In Chromium < 72 an extension is needed to share the screen
(https://github.com/nextcloud/spreed-screensharing-chrome-extension).
Once installed, the extension enables itself only in those pages that
contain an element with id "app" and class
"nc-enable-screensharing-extension" when the document is loaded.
As the element can not be added after the document has loaded and the
screen sharing should work also when Talk is enabled in other apps a
(hacky and very likely not compliant) meta element is added in the
header element to be found by the extension whenever Talk is used.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/Files')
-rw-r--r-- | lib/Files/TemplateLoader.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Files/TemplateLoader.php b/lib/Files/TemplateLoader.php index dd330b565..23fbc93af 100644 --- a/lib/Files/TemplateLoader.php +++ b/lib/Files/TemplateLoader.php @@ -58,6 +58,9 @@ class TemplateLoader implements IEventListener { Util::addStyle(Application::APP_ID, 'merged-files'); Util::addScript(Application::APP_ID, 'talk-files-sidebar'); Util::addScript(Application::APP_ID, 'talk-files-sidebar-loader'); + + // Needed to enable the screensharing extension in Chromium < 72. + Util::addHeader('meta', ['id' => "app", 'class' => 'nc-enable-screensharing-extension']); } } |