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: Make sure time displays use correctly-formatted time. #4643

Merged
merged 1 commit into from
Oct 3, 2017

Conversation

misteroneill
Copy link
Member

The recent refactoring of time displays is great, but it seems there was a bug where it would always prepend times with - even when we want a positive number (i.e. everywhere except remaining time display)!

Requirements Checklist

  • Feature implemented / Bug fixed
  • Reviewed by Two Core Contributors

@@ -66,11 +66,26 @@ class TimeDisplay extends Component {
if (this.textNode_) {
this.contentEl_.removeChild(this.textNode_);
}
this.textNode_ = document.createTextNode(` -${this.formattedTime_ || '0:00'}`);
this.textNode_ = document.createTextNode(this.formattedTime_ || '0:00');
Copy link
Member Author

Choose a reason for hiding this comment

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

This was the relevant mistake. Not all sub-classes wanted to display negative formatted times.

@misteroneill misteroneill merged commit 20f7fe9 into videojs:master Oct 3, 2017
@misteroneill misteroneill deleted the fix-time-displays branch October 3, 2017 16:53
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