summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-10-20 12:46:46 -0400
committerSacha Chua <sacha@sachachua.com>2023-10-20 12:46:53 -0400
commit75d6d611631c7c1783a590cc1192ff6ef3fa27d9 (patch)
tree378f058563107275054e9a7bda0a54fe679f17df
parent44378fb23b01ed8a00e1dda3639b711f7e9e719c (diff)
downloademacsconf-ansible-75d6d611631c7c1783a590cc1192ff6ef3fa27d9.tar.xz
emacsconf-ansible-75d6d611631c7c1783a590cc1192ff6ef3fa27d9.zip
update BBB script
-rw-r--r--README.org65
-rw-r--r--roles/obs/tasks/main.yml3
-rwxr-xr-xroles/obs/templates/bbb5
3 files changed, 67 insertions, 6 deletions
diff --git a/README.org b/README.org
index a5f8764..c7c0757 100644
--- a/README.org
+++ b/README.org
@@ -274,11 +274,68 @@ ansible-playbook -i inventory.yml prod-playbook.yml --tags obs
Resizing VNC after connection
xrandr -s 1280x720
-
-Firefox profiles like to be created in an X environment
+** Firefox
+*** Firefox profiles like to be created in an X environment
firefox -no-remote -CreateProfile "{{ emacsconf_id }}-{{ item.item.id }}
-
-Update scenes from the gen copy:
+*** Install Tampermonkey extension and scripts :manual:
+
+For each track:
+
+1. Install the Tampermonkey extension by going to https://addons.mozilla.org/en-US/firefox/addon/tampermonkey/ .
+
+2. Install the script by clicking on the Tampermonkey extension, choosing *Install New Script*, and pasting in the following:
+
+ #+begin_src js :eval no
+ // ==UserScript==
+ // @name Emacsconf BBB setup
+ // @namespace https://emacsconf.org/
+ // @version 0.1
+ // @description Join BBB and set things up
+ // @author You
+ // @match https://bbb.emacsverse.org/*
+ // @icon https://www.google.com/s2/favicons?sz=64&domain=emacsverse.org
+ // @grant none
+ // ==/UserScript==
+ (
+ async function() {
+ 'use strict';
+ const NAME = 'emacsconf';
+ async function waitUntil(conditionFunc, interval=500, timeout=null) {
+ let initResult = conditionFunc();
+ if (initResult) return initResult;
+ return new Promise((resolve, reject) => {
+ let timeSoFar = 0;
+ let timer = setInterval(() => {
+ let result = conditionFunc();
+ if (result) {
+ clearInterval(timer);
+ resolve(result);
+ }
+ timeSoFar += interval;
+ if (timeout && timeSoFar > timeout) {
+ clearInterval(timer);
+ reject();
+ }
+ }, interval);
+ });
+ }
+ if (document.querySelector('input.join-form')) {
+ document.querySelector('input.join-form').value = NAME;
+ document.querySelector('#room-join').click();
+ return;
+ }
+ await waitUntil(() => document.querySelector('.icon-bbb-listen')).then((e) => e.closest('button').click());
+ await waitUntil(() => document.querySelector('.icon-bbb-user')).then((e) => e.closest('button').click());
+ })();
+ #+end_src
+
+ Press =Ctrl+s= to save.
+
+ Join an BBB meeting and switch out of full-screen with F11. Check the address bar to see if autoplay is disabled (crossed-out autoplay icon). If it is, click on it and change *Block audio* to *Allow audio and video*.
+
+
+
+** How to update scenes from the gen copy
ssh emacsconf-gen@res.emacsconf.org -p 46668 "cat ~/.config/obs-studio/basic/scenes/emacsconf.json" | jq 'walk(if type == "string" then gsub("emacsconf"; "{{ emacsconf_id }}") else . end)' > roles/obs/templates/scenes.json
ansible-playbook -i inventory.yml prod-playbook.yml --tags obs-scene
diff --git a/roles/obs/tasks/main.yml b/roles/obs/tasks/main.yml
index 946d1d7..c73f596 100644
--- a/roles/obs/tasks/main.yml
+++ b/roles/obs/tasks/main.yml
@@ -79,7 +79,7 @@
state: directory
mode: 0775
- name: Set up scripts
- tags: wip
+ tags: wip, obs-scripts
template:
src: "{{ item }}"
dest: /usr/local/bin
@@ -92,3 +92,4 @@
- intro
- bbb
- pad
+ - handle-session
diff --git a/roles/obs/templates/bbb b/roles/obs/templates/bbb
index 240a122..abe1da1 100755
--- a/roles/obs/templates/bbb
+++ b/roles/obs/templates/bbb
@@ -10,4 +10,7 @@ fi
# Update the overlay
SLUG=$1
overlay $SLUG
-firefox https://media.emacsconf.org/{{ emacsconf_year }}/backstage/current/room/$SLUG
+firefox https://media.emacsconf.org/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$SLUG.html &
+sleep 2
+xdotool key Return
+xdotool key F11