Update and render on remaining time changes

This commit is contained in:
Christoph Heinrich
2022-07-22 05:12:47 +02:00
committed by Tomas Klaen
parent 17d400c442
commit 276b590e07

View File

@@ -3147,9 +3147,12 @@ mp.observe_property('playback-time', 'number', function(name, val)
state.position = val
state.elapsed_seconds = val
state.elapsed_time = state.elapsed_seconds and mp.format_time(state.elapsed_seconds) or nil
request_render()
end)
mp.observe_property('playtime-remaining', 'number', function(name, val)
state.remaining_seconds = mp.get_property_native('playtime-remaining')
state.remaining_time = state.remaining_seconds and mp.format_time(state.remaining_seconds) or nil
request_render()
end)
mp.observe_property('osd-dimensions', 'native', function(name, val)