Comparar commits

...

1 Commits

Autor SHA1 Mensagem Data
brandonocasey cc952faea6 feat: better better remainingTime display rounding 2017-10-02 16:19:12 -04:00
2 arquivos alterados com 12 adições e 1 exclusões
@@ -49,7 +49,7 @@ class RemainingTimeDisplay extends TimeDisplay {
return;
}
this.updateFormattedTime_(this.player_.remainingTime());
this.updateFormattedTime_(this.player_.remainingTimeDisplay());
}
/**
+11
Ver Arquivo
@@ -1787,6 +1787,17 @@ class Player extends Component {
return this.duration() - this.currentTime();
}
/**
* A remaining time function that is intented to be used when
* the time is to be displayed directly to the user.
*
* @return {number}
* The rounded time remaining in seconds
*/
remainingTimeDisplay() {
return Math.floor(this.duration()) - Math.floor(this.currentTime());
}
//
// Kind of like an array of portions of the video that have been downloaded.