youtube.el 575 B

12345678910111213141516171819
  1. (setq youtube-stream-open-chat-function
  2. #'browse-url-chromium-no-toolbar)
  3. (setq youtube-stream-open-video-function #'browse-url-streamlink)
  4. (defun ytel-watch ()
  5. "Stream video at point in mpv."
  6. (interactive)
  7. (let* ((video (ytel-get-current-video))
  8. (id (ytel-video-id video)))
  9. (start-process "ytel mpv" nil
  10. "mpv"
  11. (concat "https://www.youtube.com/watch?v=" id)))
  12. (message "Starting streaming..."))
  13. (with-eval-after-load 'ytel
  14. (let ((map ytel-mode-map))
  15. (define-key map (kbd "<return>") 'ytel-watch)))