diff options
Diffstat (limited to 'eos/jao-embark-targets.el')
-rw-r--r-- | eos/jao-embark-targets.el | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/eos/jao-embark-targets.el b/eos/jao-embark-targets.el index f55398c..0461769 100644 --- a/eos/jao-embark-targets.el +++ b/eos/jao-embark-targets.el @@ -48,15 +48,26 @@ (cons 'video-url url) (cons 'url url))) -(defun jao-embark-targets-play-video-url (&optional url) +(defun jao-embark-targets--play-video (player url) (interactive "sURL: ") - (let ((cmd (format "mpv %s" (shell-quote-argument url)))) - (start-process-shell-command "mpv" nil cmd))) + (let ((cmd (format "%s %s" player (shell-quote-argument url)))) + (start-process-shell-command player nil cmd))) + +(defun jao-embark-targets-mpv (&optional url) + "Play video stream with mpv" + (interactive "sURL: ") + (jao-embark-targets--play-video "mpv" url)) + +(defun jao-embark-targets-vlc (&optional url) + "Play video stream with vlc" + (interactive "sURL: ") + (jao-embark-targets--play-video "vlc" url)) (embark-define-keymap jao-embark-targets-video-url-map "Actions on URLs pointing to remote video streams." :parent embark-url-map - ("p" jao-embark-targets-play-video-url)) + ("v" jao-embark-targets-vlc) + ("m" jao-embark-targets-mpv)) (define-key embark-url-map (kbd "f") #'browse-url-firefox) |