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(error): chromium reset mediaError when the poster is invalid #8410

Merged
merged 1 commit into from
Sep 27, 2023

Conversation

amtins
Copy link
Contributor

@amtins amtins commented Aug 20, 2023

Description

Fixes #8409, when both the media URL and the poster return a response other than 200. The media error is overwritten by an empty error, leaving the player in an inconsistent state.

Screencast.from.20.08.23.18.35.52.webm

Specific Changes proposed

  • add a condition to handleTechError_ to ensure that the error is truthy
  • add a test case

Requirements Checklist

  • Feature implemented / Bug fixed
  • If necessary, more likely in a feature request than a bug fix
    • Change has been verified in an actual browser (Chrome, Firefox, IE)
    • Unit Tests updated or fixed
    • Docs/guides updated
    • Example created (starter template on JSBin)
  • Reviewed by Two Core Contributors

When both the media URL and the poster return a response other than 200.
The media error is overwritten by an empty error, leaving the player in an inconsistent state.

- add a condition to `handleTechError_` to ensure that the `error` is truthy
- add a test case

Fixes videojs#8409
@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #8410 (b3ba341) into main (b95cd7a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #8410   +/-   ##
=======================================
  Coverage   82.68%   82.68%           
=======================================
  Files         113      113           
  Lines        7578     7579    +1     
  Branches     1821     1822    +1     
=======================================
+ Hits         6266     6267    +1     
  Misses       1312     1312           
Files Changed Coverage Δ
src/js/player.js 90.90% <100.00%> (+<0.01%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mister-ben mister-ben merged commit 68f1429 into videojs:main Sep 27, 2023
@amtins amtins deleted the fix/chromium-poster-error branch November 5, 2023 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Player error overwritten by empty poster error on Chromium browsers
2 participants