diff options
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 6 |
1 files changed, 6 insertions, 0 deletions
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 "<C-return>") #'mastodon-tl--mpv-play-video-at-point) + (define-key map (kbd "<mouse-2>") #'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, |