diff options
Diffstat (limited to '')
-rwxr-xr-x | roles/obs/templates/play | 11 | ||||
-rwxr-xr-x | roles/obs/templates/play-with-intro | 9 |
2 files changed, 11 insertions, 9 deletions
diff --git a/roles/obs/templates/play b/roles/obs/templates/play index 22f58c7..69632d4 100755 --- a/roles/obs/templates/play +++ b/roles/obs/templates/play @@ -11,18 +11,25 @@ CACHE_DIR="{{ emacsconf_caption_dir }}/cache" FIREFOX_NAME=firefox-esr SLUG=$1 PREFIX=$(get-file-prefix $SLUG) - +PREFER_LIVE=$(jq -r ".talks[] | select(.slug == \"$SLUG\") | .\"prefer-live\" " < "$BASE_DIR/talks.json") /usr/local/bin/reset-state # Update the overlay overlay $SLUG +if [ "$PREFER_LIVE" = "t" ]; then + /usr/local/bin/bbb $SLUG + exit 0 +fi + # Play the video if it exists. If it doesn't exist, switch to the BBB room and stop processing. if [ "x$TEST_MODE" = "x" ]; then - LIST=($BASE_DIR/assets/stream/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm) + LIST=($CACHE_DIR/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm) else LIST=($BASE_DIR/assets/test/{{ emacsconf_id }}-{{ emacsconf_year }}-$SLUG*--main.webm) fi + + FILE="${LIST[0]}" # No file in the stream directory; check for original files in the stream directory, then check the cache NOSUB="" diff --git a/roles/obs/templates/play-with-intro b/roles/obs/templates/play-with-intro index 7f7865b..0390f8f 100755 --- a/roles/obs/templates/play-with-intro +++ b/roles/obs/templates/play-with-intro @@ -13,15 +13,10 @@ PREFIX=$(get-file-prefix $SLUG) /usr/local/bin/reset-state # Update the overlay -overlay $SLUG +/usr/local/bin/overlay $SLUG # Play the intro if it exists. If it doesn't exist, switch to the intro slide and stop processing. -if [[ -f $CACHE_DIR/$PREFIX--intro.webm ]]; then - mpv $CACHE_DIR/$PREFIX--intro.webm -else - firefox --kiosk $BASE_DIR/assets/in-between/$SLUG.png - exit 0 -fi +/usr/local/bin/intro $SLUG /usr/local/bin/play $SLUG |