LibMedia+LibWeb: Never return errors when getting PlaybackStream time

We should be fine to just fall back to zero or the last returned value
if we encounter an error in PlaybackStream::total_time_played(), and
this also simplifies the using code.
This commit is contained in:
Zaggy1024 2025-09-25 13:44:38 -05:00 committed by Jelle Raaijmakers
parent 9da723b5c6
commit 27742ef26d
Notes: github-actions[bot] 2025-10-28 00:36:34 +00:00
11 changed files with 23 additions and 27 deletions

View file

@ -34,7 +34,6 @@ private:
AK::Duration m_duration { AK::Duration::zero() };
AK::Duration m_last_resume_in_media_time { AK::Duration::zero() };
AK::Duration m_last_resume_in_device_time { AK::Duration::zero() };
AK::Duration m_last_good_device_time { AK::Duration::zero() };
Core::EventLoop& m_main_thread_event_loop;
NonnullRefPtr<Core::Timer> m_update_timer;
bool m_paused { true };