Browse Source

feat: 切换时保存播放状态

gemercheung 1 year ago
parent
commit
cd5548a7cd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      packages/qjkankan-view/src/hooks/useAudio.js

+ 1 - 1
packages/qjkankan-view/src/hooks/useAudio.js

@@ -66,10 +66,10 @@ async function initDefaultAudio() {
             //相同URL的再次播放
             if (unref(currentPlayer).isPlaying) {
               console.log("相同URL切换时在播放");
-              unref(currentPlayer).resume();
             } else {
               console.log("相同URL切换时暂停");
             }
+            unref(currentPlayer).resume();
           }
         }
       } else {