Browse Source

Update cloudPractice.tsx

lex-xin 9 months ago
parent
commit
c07a6b34e4
1 changed files with 12 additions and 1 deletions
  1. 12 1
      src/views/cloudPractice/cloudPractice.tsx

+ 12 - 1
src/views/cloudPractice/cloudPractice.tsx

@@ -1,4 +1,4 @@
-import { computed, defineComponent, nextTick, onMounted, reactive, ref, shallowRef } from "vue"
+import { computed, defineComponent, nextTick, onMounted, reactive, ref, shallowRef, watch } from "vue"
 import styles from "./index.module.scss"
 import NavContainer from "@/businessComponents/navContainer"
 import { ElEmpty, ElMessage, ElScrollbar } from "element-plus"
@@ -35,6 +35,7 @@ import PracticeForm from "@/businessComponents/practiceForm"
 import { saveAs } from "file-saver"
 import JSZip from "jszip"
 import { svgtoblob } from "./formatSvgToImg"
+import { penShow, whitePenShow } from "@/businessComponents/globalTools/globalTools"
 
 export default defineComponent({
    name: "cloudPractice",
@@ -939,6 +940,16 @@ export default defineComponent({
          }
       }
 
+      // 白板的批注打开时暂停播放
+      watch(
+         () => [whitePenShow.value, penShow.value],
+         () => {
+            if (whitePenShow.value || penShow.value) {
+               handleChangeAudio("pause")
+            }
+         }
+      )
+
       onMounted(() => {
          const obv = new IntersectionObserver(entries => {
             if (entries[0].intersectionRatio > 0) {