Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(FEC-11586): [Player, Safari] The 'FF' (Fast forward) seek button is flashing time to time in player due to getting different values from 'isOnLiveEdge' parameter #611

Merged
merged 5 commits into from
Oct 31, 2021

Conversation

JonathanTGold
Copy link
Contributor

@JonathanTGold JonathanTGold commented Oct 24, 2021

Description of the Changes

issue: The live indicator depends on the isOnLiveEdge flag and the isOnLiveEdge flag is calculated by the following formula: liveDuration - currentTime <= segmentDuration × 2.

and the segmentDuration is calculated by the gap between last updated Video.seekable, and Video.bufferd. (and on the assumption that the bufferd is bigger than seekable at any point)

but in practice buffered Unlike Video.currentTime (which is always progresses), is sometimes reverses which brings the segmentDuration to become a negative number, and hence although that current time is close enough to seekable to be considered on live, the condition returns false since the liveDuration - currentTime would always be a positive number

fix: The solution is to not rely on the buffered to determine the liveDuration but on the gap between the seekables themself.

solves FEC-11586

CheckLists

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • test are passing in local environment
  • Travis tests are passing (or test results are not worse than on master branch :))
  • Docs have been updated

…is flashing time to time in player due to getting different values from 'isOnLiveEdge' parameter
@RoyBregman
Copy link
Contributor

Please notice unit tests are failing in Travis.
There seems to be an issue with nodejs 17.
Please have a look
webpack/webpack#14532

@JonathanTGold JonathanTGold merged commit 2d87557 into master Oct 31, 2021
@JonathanTGold JonathanTGold deleted the FEC-11586 branch October 31, 2021 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants