From 90a2795aae0c92217886f9db1dce5f44a1ec3813 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Sat, 26 Nov 2022 10:22:25 -0500 Subject: play intro even for live talks --- emacsconf-stream.el | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/emacsconf-stream.el b/emacsconf-stream.el index b9f084e..09e01fb 100644 --- a/emacsconf-stream.el +++ b/emacsconf-stream.el @@ -178,6 +178,17 @@ while OTHER-FILENAME will be displayed at other times." (save-window-excursion (emacsconf-stream-set-talk-info talk)))) +(defun emacsconf-stream-play-intro-maybe (talk) + (when (file-exists-p + (expand-file-name (concat (plist-get talk :slug) ".webm") + (expand-file-name "intros" emacsconf-stream-asset-dir))) + (emacsconf-stream-play-video + (append + talk + :stream-files + (expand-file-name (concat (plist-get talk :slug) ".webm") + (expand-file-name "intros" emacsconf-stream-asset-dir)))))) + (defun emacsconf-stream-play-talk-on-change (talk) "Play the talk." (when (string= org-state "PLAYING") @@ -187,6 +198,7 @@ while OTHER-FILENAME will be displayed at other times." (let ((default-directory (emacsconf-stream-track-login talk)) (async-shell-command-buffer 'new-buffer)) (save-window-excursion + (emacsconf-stream-play-video talk) (shell-command (concat "nohup firefox -new-window " (shell-quote-argument @@ -214,7 +226,9 @@ Final files should be stored in /data/emacsconf/stream/YEAR/video-slug--main.web "-p" (tramp-file-name-port info) "nohup" "~/bin/track-mpv") (or (and (plist-get talk :stream-files) - (split-string-and-unquote (plist-get talk :stream-files))) + (if (stringp (plist-get talk :stream-files)) + (split-string-and-unquote (plist-get talk :stream-files)) + (plist-get talk :stream-files))) (list (plist-get talk :slug))) (list ">" "/dev/null" "2>&1" "&"))))) -- cgit v1.2.3