summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README.org29
-rw-r--r--roles/obs/tasks/main.yml13
-rw-r--r--roles/obs/tasks/obs-setup.yml10
-rw-r--r--roles/obs/tasks/track.yml5
-rw-r--r--roles/obs/templates/bashrc3
-rwxr-xr-xroles/obs/templates/bbb5
6 files changed, 58 insertions, 7 deletions
diff --git a/README.org b/README.org
index c7c0757..ee11f65 100644
--- a/README.org
+++ b/README.org
@@ -283,7 +283,7 @@ 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:
+2. Install the BBB script by clicking on the Tampermonkey extension, choosing *Install New Script*, and pasting in the following:
#+begin_src js :eval no
// ==UserScript==
@@ -331,7 +331,32 @@ For each track:
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*.
+3. Add this script for IRC:
+
+ #+begin_src js :eval no
+// ==UserScript==
+// @name Connect to EmacsConf chat automatically
+// @namespace https://emacsconf.org/
+// @version 0.1
+// @description try to take over the world!
+// @author You
+// @match https://chat.emacsconf.org/*
+// @icon https://www.google.com/s2/favicons?sz=64&domain=emacsconf.org
+// @grant none
+// ==/UserScript==
+
+(function() {
+ 'use strict';
+ setTimeout(() => {
+ if (document.querySelector('.connect-row')) {
+ document.querySelector('.connect-row').closest('form').querySelector('button').click();
+ }
+ }, 1000);
+})();
+ #+end_src
+
+
+4. 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*.
diff --git a/roles/obs/tasks/main.yml b/roles/obs/tasks/main.yml
index f88cc8f..249a0bb 100644
--- a/roles/obs/tasks/main.yml
+++ b/roles/obs/tasks/main.yml
@@ -6,6 +6,15 @@
apt_repository:
repo: ppa:obsproject/obs-studio
when: ansible_distribution == "Ubuntu"
+- name: Add nodesource key
+ apt_key:
+ id: 2F59B5F99B1BE0B4
+ keyserver: keyserver.ubuntu.com
+ state: present
+- name: Add nodesource repository
+ ansible.builtin.apt_repository:
+ repo: deb https://deb.nodesource.com/node_20.x nodistro main
+ update_cache: yes
- name: Add packages
apt:
name:
@@ -19,6 +28,7 @@
- kitty
- kitty-terminfo
- alsa-utils
+ - nodejs
- dbus-x11
- obs-studio
- mumble
@@ -58,13 +68,16 @@
replace: \1 {{ emacsconf_id }}-{{ item.id }}
loop: "{{ emacsconf_tracks }}"
- name: Set system timezone
+ tags: tz
community.general.timezone:
name: "{{ emacsconf_timezone }}"
- name: Restart cron
+ tags: tz
ansible.builtin.service:
name: cron
state: restarted
- name: Set emacsconf_user timezone
+ tags: tz
lineinfile:
line: export TZ={{ emacsconf_timezone }}
dest: "/home/{{ emacsconf_user }}/.bashrc"
diff --git a/roles/obs/tasks/obs-setup.yml b/roles/obs/tasks/obs-setup.yml
index b2f8b07..5b0fba4 100644
--- a/roles/obs/tasks/obs-setup.yml
+++ b/roles/obs/tasks/obs-setup.yml
@@ -59,12 +59,18 @@
loop_control:
loop_var: filename
- name: Create OBS scripts for tracks
+ tags: obs-track-scripts
template:
- src: obs-track
- dest: "~{{ emacsconf_user }}/bin/track-obs"
+ src: "{{ script }}"
+ dest: "~{{ emacsconf_user }}/bin/{{ script }}"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
mode: 0775
+ loop_control:
+ loop_var: script
+ loop:
+ - obs-track
+ - obs-cli-track
- name: Fix permissions
become: true
become_user: root
diff --git a/roles/obs/tasks/track.yml b/roles/obs/tasks/track.yml
index 3993848..d615336 100644
--- a/roles/obs/tasks/track.yml
+++ b/roles/obs/tasks/track.yml
@@ -1,5 +1,5 @@
- name: Set vars
- tags: obs-scene, obs-profile, mpv, wip, mumble
+ tags: obs-scene, obs-profile, mpv, wip, mumble, obs-track-scripts
set_fact:
old_emacsconf_user: "{{ emacsconf_user }}"
old_emacsconf_home: "{{ emacsconf_home }}"
@@ -8,6 +8,7 @@
- debug:
var: emacsconf_home
- name: Set up user
+ tags: obs-track-scripts
include: user.yml
- name: Set up user-related things
become_user: "{{ emacsconf_user }}"
@@ -41,7 +42,7 @@
group: "{{ emacsconf_group }}"
mode: 0775
- name: Set up OBS profiles and scenes
- tags: obs-profile, obs-scene
+ tags: obs-profile, obs-scene, obs-track-scripts
include_tasks:
file: obs-setup.yml
apply:
diff --git a/roles/obs/templates/bashrc b/roles/obs/templates/bashrc
index 16a07f0..7e81001 100644
--- a/roles/obs/templates/bashrc
+++ b/roles/obs/templates/bashrc
@@ -124,3 +124,6 @@ export DISPLAY=${DISPLAY:-:{{ item.vnc_id }}}
if [ "x$DISP" != "x" ]; then
export DISPLAY={{ item.vnc_id }}
fi
+
+export OBS_PORT={{ item.obs_websocket_port }}
+export OBS_PASSWORD={{ obs_websocket_password }}
diff --git a/roles/obs/templates/bbb b/roles/obs/templates/bbb
index abe1da1..c12702c 100755
--- a/roles/obs/templates/bbb
+++ b/roles/obs/templates/bbb
@@ -10,7 +10,10 @@ fi
# Update the overlay
SLUG=$1
overlay $SLUG
+killall -s TERM firefox-esr
firefox https://media.emacsconf.org/{{ emacsconf_year }}/backstage/assets/redirects/open/bbb-$SLUG.html &
-sleep 2
+sleep 5
+xdotool search --class firefox windowactivate --sync
xdotool key Return
xdotool key F11
+wait