summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpavelxdd <pavel.otchertsov@gmail.com>2017-12-25 05:11:58 +0300
committerMartin Herkt <652892+lachs0r@users.noreply.github.com>2017-12-26 01:18:26 +0100
commit5f8402e3ecd87bbc23eafc89848e449a885bcf4c (patch)
tree62bb2d4144f9328f5e083132b4b2a486d49bc08f
parent69ae23fdd1e39f4e7aa30082e36cc635d954bccf (diff)
downloadmpv-5f8402e3ecd87bbc23eafc89848e449a885bcf4c.tar.bz2
mpv-5f8402e3ecd87bbc23eafc89848e449a885bcf4c.tar.xz
osc: make seek ranges rendering optional
This commit adds a new osc setting `seekranges` to control the seek ranges visibility.
-rw-r--r--DOCS/man/osc.rst5
-rw-r--r--player/lua/osc.lua4
2 files changed, 9 insertions, 0 deletions
diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst
index eb15056094..5e5568ce7a 100644
--- a/DOCS/man/osc.rst
+++ b/DOCS/man/osc.rst
@@ -272,6 +272,11 @@ Configurable Options
Display timecodes with milliseconds
+``seekranges``
+ Default: yes
+
+ Display seekable ranges on the seekbar
+
``visibility``
Default: auto (auto hide/show on mouse move)
diff --git a/player/lua/osc.lua b/player/lua/osc.lua
index a0f37f445f..1be24556f3 100644
--- a/player/lua/osc.lua
+++ b/player/lua/osc.lua
@@ -39,6 +39,7 @@ local user_opts = {
tooltipborder = 1, -- border of tooltip in bottom/topbar
timetotal = false, -- display total time instead of remaining time?
timems = false, -- display timecodes with milliseconds?
+ seekranges = true, -- display seek ranges?
visibility = "auto", -- only used at init to set visibility_mode(...)
boxmaxchars = 80, -- title crop threshold for box layout
}
@@ -1757,6 +1758,9 @@ function osc_init()
end
end
ne.slider.seekRangesF = function()
+ if not (user_opts.seekranges) then
+ return nil
+ end
local cache_state = mp.get_property_native("demuxer-cache-state", nil)
if not cache_state then
return nil