From 0932c7abae26e27929d08db6e6bd3c665d0f0e46 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 10 Oct 2023 16:30:00 +0200 Subject: click to play video --- lisp/mastodon-tl.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 8d1b5ea..7693ff6 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -256,6 +256,7 @@ types of mastodon links and not just shr.el-generated ones.") ;; keep new my-profile binding; shr 'O' doesn't work here anyway (define-key map (kbd "O") #'mastodon-profile--my-profile) (define-key map (kbd "") #'mastodon-tl--mpv-play-video-at-point) + (define-key map (kbd "") #'mastodon-tl--mpv-click-play-video) map) "The keymap to be set for shr.el generated image links. We need to override the keymap so tabbing will navigate to all @@ -1246,6 +1247,11 @@ displayed when the duration is smaller than a minute)." (type (plist-get video :type))) (mastodon-tl--mpv-play-video-at-point url type))) +(defun mastodon-tl--mpv-click-play-video (_event) + "Click to play video with `mpv.el''" + (interactive "e") + (mastodon-tl--mpv-play-video-at-point)) + (defun mastodon-tl--mpv-play-video-at-point (&optional url type) "Play the video or gif at point with an mpv process. URL and TYPE are provided when called while point is on byline, -- cgit v1.2.3