mirror of
https://github.com/mpv-player/mpv
synced 2024-11-14 22:48:35 +01:00
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.
This commit is contained in:
parent
679e4108f2
commit
7e2bb7b439
@ -179,11 +179,12 @@ Configurable Options
|
||||
``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.
|
||||
Controls the mode used to seek when dragging the seekbar (default: true). If
|
||||
set to true, default seeking mode is used (usually keyframes, but player
|
||||
defaults and heuristics can change it to exact). 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.
|
||||
|
||||
``seekrangestyle``
|
||||
Default: inverted
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user