summaryrefslogblamecommitdiffstats
path: root/roles/obs/templates/play-with-intro
blob: 7f7865bf8fd0e22bc525d405a4ab2effe0af6ef2 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13



                                         








                                             

                    
             







                                                                                                  
  

                         
#!/bin/bash
# Play intro if recorded, then play files
# {{ ansible_managed }}

# play-with-intro $SLUG
YEAR="{{ emacsconf_year }}"
BASE_DIR="{{ emacsconf_caption_dir }}"
CACHE_DIR="{{ emacsconf_caption_dir }}/cache"
FIREFOX_NAME=firefox-esr
SLUG=$1
PREFIX=$(get-file-prefix $SLUG)

/usr/local/bin/reset-state

# Update the overlay
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/play $SLUG