-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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(player): reset CSS classes at player.reset #8487
fix(player): reset CSS classes at player.reset #8487
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8487 +/- ##
==========================================
- Coverage 82.71% 82.71% -0.01%
==========================================
Files 113 113
Lines 7592 7591 -1
Branches 1826 1826
==========================================
- Hits 6280 6279 -1
Misses 1312 1312 ☔ View full report in Codecov by Sentry. |
src/js/player.js
Outdated
@@ -3599,6 +3599,11 @@ class Player extends Component { | |||
if (this.tech_) { | |||
this.tech_.clearTracks('text'); | |||
} | |||
|
|||
this.removeClass('vjs-playing'); | |||
this.removeClass('vjs-has-started'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the others make sense but I don't think we want to remove this one. Yes, the player is reset, but it should still be in started state, could be a breaking change, potentially as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gkatsev thank you for taking the time to review this PR and for the feedback. I removed this.removeClass('vjs-has-started');
fb83d87
to
c1e4790
Compare
Allows CSS classes to be reset when `player.reset` is called, so that the player is close to its initial state. - remove `vjs-playing` - add `vjs-paused`
c1e4790
to
da12821
Compare
Description
Allows CSS classes to be reset when
player.reset
is called, so that the player is close to its initial state.Specific Changes proposed
vjs-playing
vjs-paused
Requirements Checklist