mirror of
https://github.com/mpv-player/mpv
synced 2024-09-09 01:16:56 +02:00
osc: add seekbarkeyframes as a user option
This commit is contained in:
parent
3cb616a286
commit
c809b73db6
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user