summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/osc.rst9
-rw-r--r--player/lua/osc.lua5
2 files changed, 12 insertions, 2 deletions
diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst
index 5e5568ce7a..126d0532a5 100644
--- a/DOCS/man/osc.rst
+++ b/DOCS/man/osc.rst
@@ -171,6 +171,15 @@ Configurable Options
marker with guide), or bar (fill).
Default pre-0.21.0 was 'slider'.
+``seekbarkeyframes``
+ Default: yes
+
+ Controls the mode used to seek when dragging the seekbar. By default,
+ keyframes are used. If set to false, exact seeking on mouse drags
+ will be used instead. Keyframes are preferred, but exact seeks may be
+ useful in cases where keyframes cannot be found. Note that using exact
+ seeks can potentially make mouse dragging much slower.
+
``deadzonesize``
Default: 0.5
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index 58ee482d1e..2480515b78 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -34,6 +34,7 @@ local user_opts = {
layout = "bottombar",
seekbarstyle = "bar", -- slider (diamond marker), knob (circle
-- marker with guide), or bar (fill)
+ seekbarkeyframes = true, -- use keyframes when dragging the seekbar
title = "${media-title}", -- string compatible with property-expansion
-- to be shown as OSC title
tooltipborder = 1, -- border of tooltip in bottom/topbar
@@ -1784,8 +1785,8 @@ function osc_init()
local seekto = get_slider_value(element)
if (element.state.lastseek == nil) or
(not (element.state.lastseek == seekto)) then
- mp.commandv("seek", seekto,
- "absolute-percent", "keyframes")
+ mp.commandv("seek", seekto, "absolute-percent",
+ user_opts.seekbarkeyframes and "keyframes" or "exact")
element.state.lastseek = seekto
end