Browse Source

Merge pull request #1 from MoePlayer/master

Up-to-date
A-Circle Zhang 7 years ago
parent
commit
e9419c7ebb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/js/player.js

+ 2 - 1
src/js/player.js

@@ -422,7 +422,8 @@ class DPlayer {
          */
          */
         // show video time: the metadata has loaded or changed
         // show video time: the metadata has loaded or changed
         this.on('durationchange', () => {
         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);
                 this.template.dtime.innerHTML = utils.secondToTime(video.duration);
             }
             }
         });
         });