diff --git a/scripts/uosc.lua b/scripts/uosc.lua index fda1cc3..156d909 100644 --- a/scripts/uosc.lua +++ b/scripts/uosc.lua @@ -4267,9 +4267,13 @@ mp.observe_property('osd-dimensions', 'native', function(name, val) end) mp.observe_property('display-hidpi-scale', 'native', create_state_setter('hidpi_scale', update_display_dimensions)) mp.observe_property('demuxer-via-network', 'native', create_state_setter('is_stream', function() - set_state('uncached_ranges', state.is_stream and state.duration and {0, state.duration} or nil) Elements:trigger('dispositions') end)) +mp.observe_property('cache-buffering-state', 'native', function(_, buffering_state) + if buffering_state and buffering_state == 0 and not state.uncached_ranges and state.duration then + set_state('uncached_ranges', {{0, state.duration}}) + end +end) mp.observe_property('demuxer-cache-state', 'native', function(prop, cache_state) local cached_ranges = cache_state and cache_state['seekable-ranges'] or {} local uncached_ranges = nil