diff options
-rw-r--r-- | emacsconf-stream.el | 15 | ||||
-rw-r--r-- | emacsconf.el | 11 |
2 files changed, 23 insertions, 3 deletions
diff --git a/emacsconf-stream.el b/emacsconf-stream.el index 9d14696..5d38c12 100644 --- a/emacsconf-stream.el +++ b/emacsconf-stream.el @@ -844,6 +844,21 @@ ffplay URL (time-add (current-time) (seconds-to-time (- duration playback-position))) emacsconf-timezone)))) +(defun emacsconf-stream-rebroadcast (source-track dest-track) + (interactive + (let* ((source (emacsconf-complete-track "Source: ")) + (others (remove source emacsconf-tracks))) + (list + source + (if (= (length others) 1) + (car others) + (emacsconf-complete-track "Destination: " others))))) + (setq source-track (emacsconf-get-track source-track)) + (setq dest-track (emacsconf-get-track dest-track)) + (emacsconf-stream-track-ssh dest-track "nohup" "mpv" (plist-get source-track :stream) "--profile=full" "&")) +;; (emacsconf-stream-rebroadcast "Development" "General") +;; (emacsconf-stream-send-to-mpv "General" '(:command ("video-zoom" "0"))) +;; (emacsconf-stream-send-to-mpv "General" "set video-zoom 0") ;;; xdotool (defun emacsconf-stream-xdotool (track command) diff --git a/emacsconf.el b/emacsconf.el index b96d8da..608f4dc 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -1077,7 +1077,9 @@ (string= name (plist-get track :id)))) emacsconf-tracks) (let ((talk (emacsconf-resolve-talk name))) - (when talk (emacsconf-get-track talk))) + (seq-find (lambda (track) (or (string= (plist-get talk :track) (plist-get track :name)) + (string= (plist-get talk :track) (plist-get track :id)))) + emacsconf-tracks)) name) name)) @@ -1089,8 +1091,11 @@ info)) emacsconf-tracks)) -(defun emacsconf-complete-track () - (emacsconf-get-track (completing-read "Track: " (mapcar (lambda (o) (plist-get o :name)) emacsconf-tracks)))) +(defun emacsconf-complete-track (&optional prompt tracks) + (emacsconf-get-track + (completing-read + (or prompt "Track: ") + (mapcar (lambda (o) (plist-get o :name)) (or tracks emacsconf-tracks))))) (defun emacsconf-by-day (info) (seq-group-by (lambda (o) |