Skip to content

Commit

Permalink
Fixed seek bar issue while calling seekForward in live edge (#1759)
Browse files Browse the repository at this point in the history
* Fixed seek bar issue while calling seekForward in live edge

* 🤖 Automated Format and Fix

---------

Co-authored-by: Decoder07 <[email protected]>
  • Loading branch information
Decoder07 and Decoder07 authored Apr 30, 2024
1 parent af566b1 commit f734eb1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ class _HLSPlayerSeekbarState extends State<HLSPlayerSeekbar> {
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(
Expand Down

0 comments on commit f734eb1

Please sign in to comment.