瀏覽代碼

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

First time quality switch to default quality should not fired.
DIYgod 6 年之前
父節點
當前提交
2af0b580af
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/js/player.js

+ 1 - 0
src/js/player.js

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