Explorar el Código

Merge pull request #418 from Stumble/yumin/fix-first-time-switch

First time quality switch to default quality should not fired.
DIYgod hace 6 años
padre
commit
2af0b580af
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      src/js/player.js

+ 1 - 0
src/js/player.js

@@ -495,6 +495,7 @@ class DPlayer {
     }
 
     switchQuality (index) {
+        index = typeof index === 'string' ? parseInt(index) : index;
         if (this.qualityIndex === index || this.switchingQuality) {
             return;
         }