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: Fix video progress events accuracy #7654

Merged
merged 8 commits into from
Nov 26, 2024

Conversation

zangue
Copy link
Contributor

@zangue zangue commented Nov 22, 2024

Due do rounding errors the progress events were fired way too early (especially the complete event on longer videos). This changes use float comparison to mitigate the issue.
Further improvements (video with start time, seek handling) will be added in follow up PRs.

lib/player.js Outdated Show resolved Hide resolved
lib/player.js Outdated Show resolved Hide resolved
lib/player.js Outdated Show resolved Hide resolved
Copy link
Member

@avelad avelad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only a few nits

@avelad avelad added type: bug Something isn't working correctly priority: P2 Smaller impact or easy workaround labels Nov 25, 2024
@avelad avelad added this to the v4.13 milestone Nov 25, 2024
@avelad avelad requested a review from tykus160 November 25, 2024 09:35
lib/player.js Outdated Show resolved Hide resolved
lib/player.js Outdated Show resolved Hide resolved
@theodab theodab merged commit 5f8e958 into shaka-project:main Nov 26, 2024
17 checks passed
avelad added a commit that referenced this pull request Nov 27, 2024
Due do rounding errors the progress events were fired way too early (especially the complete event on longer videos). This changes use float comparison to mitigate the issue.
Further improvements (video with start time, seek handling) will be added in follow up PRs.

Co-authored-by: Álvaro Velad Galván <[email protected]>
avelad added a commit that referenced this pull request Nov 27, 2024
Due do rounding errors the progress events were fired way too early (especially the complete event on longer videos). This changes use float comparison to mitigate the issue.
Further improvements (video with start time, seek handling) will be added in follow up PRs.

Co-authored-by: Álvaro Velad Galván <[email protected]>
joeyparrish pushed a commit that referenced this pull request Dec 11, 2024
Due do rounding errors the progress events were fired way too early (especially the complete event on longer videos). This changes use float comparison to mitigate the issue.
Further improvements (video with start time, seek handling) will be added in follow up PRs.

Co-authored-by: Álvaro Velad Galván <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P2 Smaller impact or easy workaround type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants