diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-10 16:30:00 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-10-10 16:30:00 +0200 |
commit | 0932c7abae26e27929d08db6e6bd3c665d0f0e46 (patch) | |
tree | fbadf427fb0c317db4d5c2610551ef7fa13302c8 | |
parent | 2f45c1d4b136f8d8fb5f01d923c497774fb7e3a9 (diff) |
click to play video
-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, |