summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-07-06 12:15:48 +0300
committerThanos Apollo <[email protected]>2023-07-06 12:15:48 +0300
commit6cabd95fa89e93fc5cd6bea6e958784cb8c17a62 (patch)
tree0bad762026c45165b2797ad00c0273b90a7a4c28
parent792860d9ce6421e691c4c0d5b684c2ca4a1206da (diff)
Add yeetube-toggle-video-mpv
Toggle between video on/off for mpv player
-rw-r--r--yeetube.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/yeetube.el b/yeetube.el
index ef52487..83d411b 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -124,6 +124,14 @@ It's recommended you keep it as the default value."
(format "%s %s" yeetube-player url) nil 0)
(message "Opening with %s" yeetube-player))))
+(defun yeetube-toggle-video-mpv ()
+ "Toggle video on/off for mpv player."
+ (interactive)
+ (when yeetube-player
+ (setq yeetube-player
+ (if (equal yeetube-player "mpv --input-ipc-server=/tmp/mpvsocket")
+ "mpv --no-video --input-ipc-server=/tmp/mpvsocket"
+ "mpv --input-ipc-server=/tmp/mpvsocket"))))
;; we should use something like
;; (decode-coding-region (point-min) (point-max) 'utf-8
;; (get-buffer-create "decoded"))