summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-28 17:17:42 +0100
committerwm4 <wm4@nowhere>2020-02-28 17:17:42 +0100
commit7e2bb7b43948eeab67a03ba0e89dbf4761027073 (patch)
treead8c142a6305e4b4b98bcb5fb0d1e43e5bdb7c7e /player
parent679e4108f29db061e85687af18f0e013c067f59b (diff)
downloadmpv-7e2bb7b43948eeab67a03ba0e89dbf4761027073.tar.bz2
mpv-7e2bb7b43948eeab67a03ba0e89dbf4761027073.tar.xz
osc: use default hr-seek when dragging progress bar to seek
The "seekbarkeyframes" option is now interpreted such if it's true, the player default is used. Too lazy to make this a choice option or whatever; the Lua option parser doesn't have support for that anyway. Someone who cares can adjust this.
Diffstat (limited to 'player')
-rw-r--r--player/lua/osc.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index ec219a1fe0..e7b027cfb7 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -1960,8 +1960,11 @@ 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",
- user_opts.seekbarkeyframes and "keyframes" or "exact")
+ local flags = "absolute-percent"
+ if not user_opts.seekbarkeyframes then
+ flags = flags .. "+exact"
+ end
+ mp.commandv("seek", seekto, flags)
element.state.lastseek = seekto
end