Browse Source

修改播放

lex-xin 10 tháng trước cách đây
mục cha
commit
696746623e
1 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 8 0
      src/page-instrument/header-top/index.tsx

+ 8 - 0
src/page-instrument/header-top/index.tsx

@@ -547,6 +547,14 @@ export default defineComponent({
       if (res?.data?.api === "setPlayState") {
         togglePlay("paused", true);
       }
+      if(res?.data?.api === 'togglePlayState') {
+        if(state.playState === "play") {
+          togglePlay("paused");
+        }
+        if(state.playState === 'paused') {
+          togglePlay("play");
+        }
+      }
       // 上课页面,按钮方向
       if (res?.data?.api === "imagePos") {
         if (res?.data.data) {