summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-26 10:22:25 -0500
committerSacha Chua <sacha@sachachua.com>2022-11-26 10:22:25 -0500
commit90a2795aae0c92217886f9db1dce5f44a1ec3813 (patch)
tree498d5cd088deb416270edba0c272173e2a3ed33b
parent3f41f234e2d78bb0722c2673bf28d875236ecdb7 (diff)
downloademacsconf-el-90a2795aae0c92217886f9db1dce5f44a1ec3813.tar.xz
emacsconf-el-90a2795aae0c92217886f9db1dce5f44a1ec3813.zip
play intro even for live talks
Diffstat (limited to '')
-rw-r--r--emacsconf-stream.el16
1 files changed, 15 insertions, 1 deletions
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" "&")))))