diff --git a/DOCS/man/osc.rst b/DOCS/man/osc.rst index f91ff567f9..1653e0cc7b 100644 --- a/DOCS/man/osc.rst +++ b/DOCS/man/osc.rst @@ -310,6 +310,13 @@ Configurable Options Show total time instead of time remaining +``remaining_playtime`` + Default: yes + + Whether the time-remaining display takes speed into account. + ``yes`` - how much playback time remains at the current speed. + ``no`` - how much video-time remains. + ``timems`` Default: no diff --git a/player/lua/osc.lua b/player/lua/osc.lua index e1d6fe2973..875ad2cc3e 100644 --- a/player/lua/osc.lua +++ b/player/lua/osc.lua @@ -42,6 +42,8 @@ local user_opts = { -- to be shown as OSC title tooltipborder = 1, -- border of tooltip in bottom/topbar timetotal = false, -- display total time instead of remaining time? + remaining_playtime = true, -- display the remaining time in playtime or video-time mode + -- playtime takes speed into account, whereas video-time doesn't timems = false, -- display timecodes with milliseconds? tcspace = 100, -- timecode spacing (compensate font size estimation) visibility = "auto", -- only used at init to set visibility_mode(...) @@ -2105,10 +2107,12 @@ function osc_init() ne.content = function () if (state.rightTC_trem) then local minus = user_opts.unicodeminus and UNICODE_MINUS or "-" + local property = user_opts.remaining_playtime and "playtime-remaining" + or "time-remaining" if state.tc_ms then - return (minus..mp.get_property_osd("playtime-remaining/full")) + return (minus..mp.get_property_osd(property .. "/full")) else - return (minus..mp.get_property_osd("playtime-remaining")) + return (minus..mp.get_property_osd(property)) end else if state.tc_ms then