This commit is contained in:
Sam Potts
2018-01-22 23:20:03 +11:00
parent 26e9aaceb8
commit b298587c0b
7 changed files with 17 additions and 12 deletions

View File

@ -1,6 +1,6 @@
// ==========================================================================
// Plyr
// plyr.js v3.0.0-beta.3
// plyr.js v3.0.0-beta.4
// https://github.com/sampotts/plyr
// License: The MIT License (MIT)
// ==========================================================================

View File

@ -293,7 +293,7 @@ const ui = {
// Update the displayed time
updateTimeDisplay(target = null, time = 0, inverted = false) {
// Bail if there's no element to display or the value isn't a number
if (!utils.is.element(target)) {
if (!utils.is.element(target) || !utils.is.number(time)) {
return;
}

View File

@ -612,6 +612,11 @@ const utils = {
// Format time to UI friendly string
formatTime(time = 0, displayHours = false, inverted = false) {
// Bail if the value isn't a number
if (!utils.is.number(time)) {
return;
}
// Format time component to add leading zero
const format = value => `0${value}`.slice(-2);