From f734eb11eb742c76ee8bded4f35616444b3786d8 Mon Sep 17 00:00:00 2001 From: Pushpam <93931528+Decoder07@users.noreply.github.com> Date: Tue, 30 Apr 2024 19:01:17 +0530 Subject: [PATCH] Fixed seek bar issue while calling seekForward in live edge (#1759) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed seek bar issue while calling seekForward in live edge * 🤖 Automated Format and Fix --------- Co-authored-by: Decoder07 --- .../lib/src/hls_viewer/hls_player_seekbar.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/hms_room_kit/lib/src/hls_viewer/hls_player_seekbar.dart b/packages/hms_room_kit/lib/src/hls_viewer/hls_player_seekbar.dart index fe28dc1b4..e23176088 100644 --- a/packages/hms_room_kit/lib/src/hls_viewer/hls_player_seekbar.dart +++ b/packages/hms_room_kit/lib/src/hls_viewer/hls_player_seekbar.dart @@ -49,7 +49,12 @@ class _HLSPlayerSeekbarState extends State { hlsPlayerStore.timeFromLive, hlsPlayerStore.rollingWindow), builder: (_, data, __) { maxValue = data.item2.inSeconds; - seekBarValue = maxValue > 0 ? maxValue - data.item1.inSeconds : 0; + + ///We only subtract the time from live from the rolling window if the time from live is greater than 0 + seekBarValue = maxValue > 0 + ? maxValue - + (data.item1.inSeconds > 0 ? data.item1.inSeconds : 0) + : 0; minValue = 0; return (maxValue > 0 && seekBarValue > 0) ? SliderTheme(