Merge pull request #1 from MoePlayer/master

Up-to-date
This commit is contained in:
A-Circle Zhang 2018-08-13 15:17:15 +08:00 committed by GitHub
commit e9419c7ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -422,7 +422,8 @@ class DPlayer {
*/
// show video time: the metadata has loaded or changed
this.on('durationchange', () => {
if (video.duration !== 1) { // compatibility: Android browsers will output 1 at first
// compatibility: Android browsers will output 1 or Infinity at first
if (video.duration !== 1 && video.duration !== Infinity) {
this.template.dtime.innerHTML = utils.secondToTime(video.duration);
}
});