ソースを参照

只要有播放,就暂停

liushengqiang 2 年 前
コミット
48b07a1de8
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/subpages/colexiu/buttons/player.tsx

+ 2 - 2
src/subpages/colexiu/buttons/player.tsx

@@ -26,8 +26,8 @@ export default defineComponent({
 
     const changePlay = (res: any) => {
       if (res?.data?.api === 'setPlayState') {
-        console.log('父页面的切换事件', res.data, runtime.playState)
-        if (runtime.playState == 'play') {
+        console.log('父页面的切换事件', res.data, runtime.playState, runtime.currentTimeNum > 0)
+        if (runtime.currentTimeNum > 0) {
           RuntimeUtils.setPlayState()
         }
         RuntimeUtils.stopTick()