This commit is contained in:
Case Duckworth 2021-09-27 23:08:20 -05:00
parent 07f56f870f
commit bc902ff38e
1 changed files with 16 additions and 0 deletions

16
init.el
View File

@ -2373,6 +2373,22 @@ If used with a numeric prefix argument N, N backticks will be inserted."
(setup (:straight xr))
(setup (:straight-if ytel
(executable-find "mpv"))
;; This might need to be changed depending on whether the instance goes down.
(:option ytel-invidious-api-url "https://invidious.snopyta.org")
(:bind "y"
(defun ytel-watch () ; This could possibly use `browse-url'.
"Stream video at point in mpv."
(interactive)
(let* ((video (ytel-get-current-video))
(id (ytel-video-id video)))
(start-process "ytel mpv" nil
"mpv"
(concat "https://www.youtube.com/watch?v=" id)
"--ytdl-format=bestvideo[height<=?720]+bestaudio/best")
(message "Starting streaming...")))))
(setup (:straight zzz-to-char)
(:global "M-z"