summaryrefslogtreecommitdiffstats
path: root/player/lua/osc.lua
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2023-08-30 01:18:59 +0600
committersfan5 <sfan5@live.de>2023-09-02 18:14:02 +0200
commit022dbfc977c3d88cf693ce184c2f86073ae12428 (patch)
treefb0687a446f38206c2ef8a432f80f8e37b30ff47 /player/lua/osc.lua
parent0652a0b545a1c11627e153d187292d905be15bb0 (diff)
downloadmpv-022dbfc977c3d88cf693ce184c2f86073ae12428.tar.bz2
mpv-022dbfc977c3d88cf693ce184c2f86073ae12428.tar.xz
osc: add scrolling to the seekbar
the osc currently allows for changing volume via scrolling when on top of the volume icon. this does the same thing for the seekbar by allowing seeking via scroll.
Diffstat (limited to 'player/lua/osc.lua')
-rw-r--r--player/lua/osc.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 0126d4da31..98e8558a15 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -2046,6 +2046,10 @@ function osc_init()
"absolute-percent", "exact") end
ne.eventresponder["reset"] =
function (element) element.state.lastseek = nil end
+ ne.eventresponder["wheel_up_press"] =
+ function () mp.commandv("osd-auto", "seek", 10) end
+ ne.eventresponder["wheel_down_press"] =
+ function () mp.commandv("osd-auto", "seek", -10) end
-- tc_left (current pos)