Initial release
authorRuben Rodriguez <ruben@gnu.org>
Tue, 21 Apr 2020 22:00:41 +0000 (18:00 -0400)
committerRuben Rodriguez <ruben@gnu.org>
Tue, 21 Apr 2020 22:00:41 +0000 (18:00 -0400)
files/LPlogo.png [new file with mode: 0644]
files/download.jitsi.org.asc [new file with mode: 0644]
files/index.html [new file with mode: 0644]
handlers/main.yml [new file with mode: 0644]
tasks/main.yml [new file with mode: 0644]

diff --git a/files/LPlogo.png b/files/LPlogo.png
new file mode 100644 (file)
index 0000000..bc7ebd7
Binary files /dev/null and b/files/LPlogo.png differ
diff --git a/files/download.jitsi.org.asc b/files/download.jitsi.org.asc
new file mode 100644 (file)
index 0000000..5a78785
--- /dev/null
@@ -0,0 +1,51 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1
+
+mQINBFdrVgMBEACzVgG0ThyeWB4SpWFH2H80EJS2U1cgPfovwvsN5Ar/DvWE0vAO
+4Ti5jfKTtG5fRMF1xvTP1lB7DOmhvuMyV4/Z0C2+PLY5COh/U0+S3WKtUejd0to0
++I59AVAoa9H3Z5knME23FsHY4vQFY/vFEDVVvbFERFmmPLTi/m3A+15yaE1hIPub
+U5qDxkCLJVt5EtTDRqr+u3jIVtJ6WhRdP90H6nij7zpli9uoEefOf1WTdV7JkNXo
+oW7Mcy8cxiYJ9sSfRN3m3HClufOhyRCb4DEPfSRdz8AR0edRJefoyVMgHI+in9+0
+B80zYMhEq/dSTuyo/0yrW2jT3z4cR+RzO99ukA0a3j2cn/O2ILsE5AD5Ig3hamiu
+3Q2glleYOVlBE7Pp7V5cNMPhxsI3rIif1kanbGozhup1WCaidopNp8MeVwqq0cLD
+J1IoUoEB6F45dBL+CrFc02AHefyfYzlWdxusQR9vSXsM5cfTUkZqtdH8G3idEVQt
+ok8yIrKdirOEhmb+MIop8royz6vElAQbekRetKPsba1MzGf6WSW+FnVuVYg7vB/8
+8mWt6fimXl3cn3yoBjdDQvUS3Op5mYxq4xqf/ejX5iFIec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bbdFu3AvoaVttuEla3l7rtrPsDSiMop9r
+NC1uy/ZOHOSqceRYUf+W2mdwf2O+De1xR1ETg35r2fQS6P2rEL35tlY8W2xQIjXn
+0L3JhAxjhKZJmJZ+o4VgVaSY5uQ7hGivUwXtt9tkzreqcNK/GhTkt0G1hDqRO4/K
+8K1FOZY5vG6jO1ZEBb6yX3HS4dYDAXG82AYt/nQlWDPQZQg=
+=xG9N
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/files/index.html b/files/index.html
new file mode 100644 (file)
index 0000000..4306d4e
--- /dev/null
@@ -0,0 +1,161 @@
+<html itemscope itemtype="http://schema.org/Product" prefix="og: http://ogp.me/ns#" xmlns="http://www.w3.org/1999/html">
+  <head>
+    <!--#include virtual="head.html" -->
+    <meta charset="utf-8">
+    <meta http-equiv="content-type" content="text/html;charset=utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <!--#include virtual="base.html" -->
+
+    <link rel="stylesheet" href="css/all.css?v=3729">
+
+    <script>
+// @license magnet:?xt=urn:btih:8e4f440f4c65981c5bf93c76d35135ba5064d8b7&dn=apache-2.0.txt Apache-2.0
+        // IE11 and earlier can be identified via their user agent and be
+        // redirected to a page that is known to have no newer js syntax.
+        if (window.navigator.userAgent.match(/(MSIE|Trident)/)) {
+            window.location.href = "static/recommendedBrowsers.html";
+        }
+
+        window.indexLoadedTime = window.performance.now();
+        console.log("(TIME) index.html loaded:\t", indexLoadedTime);
+        // XXX the code below listeners for errors and displays an error message
+        // in the document body when any of the required files fails to load.
+        // The intention is to prevent from displaying broken page.
+        var criticalFiles = [
+            "config.js",
+            "utils.js",
+            "do_external_connect.js",
+            "interface_config.js",
+            "logging_config.js",
+            "lib-jitsi-meet.min.js",
+            "app.bundle.min.js",
+            "all.css?v=3729"
+        ];
+        var loadErrHandler = function(e) {
+            var target = e.target;
+            // Error on <script> and <link>(CSS)
+            // <script> will have .src and <link> .href
+            var fileRef = (target.src ? target.src : target.href);
+            if (("SCRIPT" === target.tagName || "LINK" === target.tagName)
+                && criticalFiles.some(
+                    function(file) { return fileRef.indexOf(file) !== -1 })) {
+                window.onload = function() {
+                    // The whole complex part below implements page reloads with
+                    // "exponential backoff". The retry attempt is passes as
+                    // "rCounter" query parameter
+                    var href = window.location.href;
+
+                    var retryMatch = href.match(/.+(\?|&)rCounter=(\d+)/);
+                    var retryCountStr = retryMatch ? retryMatch[2] : "0";
+                    var retryCount = Number.parseInt(retryCountStr);
+
+                    if (retryMatch == null) {
+                        var separator = href.indexOf("?") === -1 ? "?" : "&";
+                        var hashIdx = href.indexOf("#");
+
+                        if (hashIdx === -1) {
+                            href += separator + "rCounter=1";
+                        } else {
+                            var hashPart = href.substr(hashIdx);
+
+                            href = href.substr(0, hashIdx)
+                                + separator + "rCounter=1" + hashPart;
+                        }
+                    } else {
+                        var separator = retryMatch[1];
+
+                        href = href.replace(
+                            /(\?|&)rCounter=(\d+)/,
+                            separator + "rCounter=" + (retryCount + 1));
+                    }
+
+                    var delay = Math.pow(2, retryCount) * 2000;
+                    if (isNaN(delay) || delay < 2000 || delay > 60000)
+                        delay = 10000;
+
+                    var showMoreText = "show more";
+                    var showLessText = "show less";
+
+                    document.body.innerHTML
+                        = "<div style='"
+                        + "position: absolute;top: 50%;left: 50%;"
+                        + "text-align: center;"
+                        + "font-size: medium;"
+                        + "font-weight: 400;"
+                        + "transform: translate(-50%, -50%)'>"
+                        + "Uh oh! We couldn't fully download everything we needed :("
+                        + "<br/> "
+                        + "We will try again shortly. In the mean time, check for problems with your Internet connection!"
+                        + "<br/><br/> "
+                        + "<div id='moreInfo' style='"
+                        + "display: none;'>" + "Missing " + fileRef
+                        + "<br/><br/></div>"
+                        + "<a id='showMore' style='"
+                        + "text-decoration: underline;"
+                        + "font-size:small;"
+                        + "cursor: pointer'>" + showMoreText + "</a>"
+                        + "&nbsp;&nbsp;&nbsp;"
+                        + "<a id ='reloadLink' style='"
+                        + "text-decoration: underline;"
+                        + "font-size:small;"
+                        + "'>reload now</a>"
+                        + "</div>";
+
+                    var reloadLink = document.getElementById('reloadLink');
+                    reloadLink.setAttribute('href', href);
+
+                    var showMoreElem = document.getElementById("showMore");
+                    showMoreElem.addEventListener('click', function () {
+                            var moreInfoElem
+                                    = document.getElementById("moreInfo");
+
+                            if (showMoreElem.innerHTML === showMoreText) {
+                                moreInfoElem.setAttribute(
+                                    "style",
+                                    "display: block;"
+                                    + "color:#FF991F;"
+                                    + "font-size:small;"
+                                    + "user-select:text;");
+                                showMoreElem.innerHTML = showLessText;
+                            }
+                            else {
+                                moreInfoElem.setAttribute(
+                                    "style", "display: none;");
+                                showMoreElem.innerHTML = showMoreText;
+                            }
+                        });
+
+                    window.setTimeout(
+                        function () { window.location.replace(href); }, delay);
+
+                    // Call extra handler if defined.
+                    if (typeof postLoadErrorHandler === "function") {
+                        postLoadErrorHandler(fileRef);
+                    }
+                };
+                window.removeEventListener(
+                    'error', loadErrHandler, true /* capture phase */);
+            }
+        };
+        window.addEventListener(
+            'error', loadErrHandler, true /* capture phase type of listener */);
+// @license-end
+    </script>
+    <script><!--#include virtual="/config.js" --></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
+    <!--#include virtual="connection_optimization/connection_optimization.html" -->
+    <script src="libs/do_external_connect.min.js?v=1"></script>
+    <script><!--#include virtual="/interface_config.js" --></script>
+    <script><!--#include virtual="/logging_config.js" --></script>
+    <script src="libs/lib-jitsi-meet.min.js?v=3729"></script>
+    <script src="libs/app.bundle.min.js?v=3729"></script>
+    <!--#include virtual="title.html" -->
+    <!--#include virtual="plugin.head.html" -->
+    <!--#include virtual="static/welcomePageAdditionalContent.html" -->
+    <!--#include virtual="static/settingsToolbarAdditionalContent.html" -->
+  </head>
+  <body>
+    <!--#include virtual="body.html" -->
+    <div id="react"></div>
+    <div style="display:none"><a href="https://weblabels.fsf.org/meet.fsf.org/CURRENT/" rel="jslicense">JavaScript license information</a></div>
+  </body>
+</html>
diff --git a/handlers/main.yml b/handlers/main.yml
new file mode 100644 (file)
index 0000000..2a92110
--- /dev/null
@@ -0,0 +1,11 @@
+---
+
+- name: restart apache
+  service:
+    name: apache2
+    state: reloaded
+
+- name: restart syslog-ng
+  service:
+    name: syslog-ng
+    state: reloaded
diff --git a/tasks/main.yml b/tasks/main.yml
new file mode 100644 (file)
index 0000000..ae6f239
--- /dev/null
@@ -0,0 +1,118 @@
+---
+
+- name: add jitsi apt key
+  apt_key:
+    data: "{{ lookup('file', 'files/download.jitsi.org.asc') }}"
+    state: present
+
+- name: add jitsi apt repo
+  apt_repository:
+    repo: deb https://download.jitsi.org stable/
+    state: present
+    update_cache: yes
+    filename: 'jitsi'
+
+# TODO: 
+# Automate jitsi apt installation. By now, after running this playbook once you have to run 'apt install jitsi-meet'
+
+- name: http ports
+  ufw:
+    comment: http ports
+    rule: allow
+    port: "{{ item }}"
+    direction: in
+  with_items:
+    - 80
+    - 443
+
+- name: check if jitsi is installed
+  stat: path=/usr/share/jitsi-meet
+  register: j
+
+- name: copy watermark logo
+  copy:
+    src: files/LPlogo.png
+    dest: /usr/share/jitsi-meet/images/watermark.png
+    owner: root
+    group: root
+    mode: 0444
+  when: j.stat.exists
+
+- name: copy index.html (librejs)
+  copy:
+    src: files/index.html
+    dest: /usr/share/jitsi-meet/index.html
+    owner: root
+    group: root
+    mode: 0444
+  when: j.stat.exists
+
+- name: custom css
+  lineinfile:
+    path: /usr/share/jitsi-meet/css/all.css
+    line: ".header-text-description, .unsupported-desktop-browser__description {display:none!important}"
+  when: j.stat.exists
+
+- name: fellow hacker
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "Fellow Jitser"
+    replace: "Fellow Hacker"
+  when: j.stat.exists
+
+- name: disable youtube button
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "'sharedvideo',"
+    replace: ""
+  when: j.stat.exists
+
+- name: disable background blur button
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "'videobackgroundblur',"
+    replace: ""
+  when: j.stat.exists
+
+- name: disable background blur
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "DISABLE_VIDEO_BACKGROUND: false,"
+    replace: "DISABLE_VIDEO_BACKGROUND: true,"
+  when: j.stat.exists
+
+- name: link
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "https://jitsi.org"
+    replace: "https://libreplanet.org"
+  when: j.stat.exists
+
+- name: quality icon
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "VIDEO_QUALITY_LABEL_DISABLED: false"
+    replace: "VIDEO_QUALITY_LABEL_DISABLED: true"
+  when: j.stat.exists
+
+- name: hide toolbar quick
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "TOOLBAR_TIMEOUT: 4000,"
+    replace: "TOOLBAR_TIMEOUT: 1000,"
+  when: j.stat.exists
+
+- name: hide logo
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "SHOW_WATERMARK_FOR_GUESTS: true,"
+    replace: "SHOW_WATERMARK_FOR_GUESTS: false,"
+  when: j.stat.exists
+
+- name: hide logo
+  replace:
+    path: /usr/share/jitsi-meet/interface_config.js
+    regexp: "SHOW_JITSI_WATERMARK: true,"
+    replace: "SHOW_JITSI_WATERMARK: false,"
+  when: j.stat.exists
+