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-display): component remains displayed after player reset #8482

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

amtins
Copy link
Contributor

@amtins amtins commented Nov 4, 2023

Description

When player.reset is called, the errorDisplay component is not reset, and neither is player.error.

Screencast.from.04.11.23.17.08.14.webm

Specific Changes proposed

  • Sets player.error to null, so that the player.errorDisplay and player.error are correctly reset.
  • Adds an error function to the testPlayer stub to prevent tests from failing.

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 `player.reset` is called, the `errorDisplay` component is not reset, and neither is `player.error`.

- Sets `player.error` to `null`, so that the `player.errorDisplay` and `player.error` are correctly reset.
- Adds an `error` function to the `testPlayer` stub to prevent tests from failing.
Copy link

codecov bot commented Nov 4, 2023

Codecov Report

Merging #8482 (7067c4e) into main (d535e16) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #8482   +/-   ##
=======================================
  Coverage   82.71%   82.71%           
=======================================
  Files         113      113           
  Lines        7589     7590    +1     
  Branches     1826     1826           
=======================================
+ Hits         6277     6278    +1     
  Misses       1312     1312           
Files Coverage Δ
src/js/player.js 90.90% <100.00%> (+<0.01%) ⬆️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@mister-ben mister-ben merged commit 7972c23 into videojs:main Nov 28, 2023
10 checks passed
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.

2 participants