ソースを参照

取消禁止录屏

liushengqiang 2 年 前
コミット
0cdf46700d
1 ファイル変更22 行追加22 行削除
  1. 22 22
      src/views/coursewarePlay/index.tsx

+ 22 - 22
src/views/coursewarePlay/index.tsx

@@ -244,7 +244,7 @@ export default defineComponent({
           }
         })
         //检测是否录屏
-        handleLimitScreenRecord()
+        // handleLimitScreenRecord()
       })
     }
     const getDetail = async () => {
@@ -336,30 +336,30 @@ export default defineComponent({
       getCourseSchedule()
       window.addEventListener('message', iframeHandle)
 
-      //禁止录屏 ios
-      listenerMessage('setVideoPlayer', (result) => {
-        if (result?.content?.status == 'pause'){
-          handleLimitScreenRecord()
-        }
-      })
+      // //禁止录屏 ios
+      // listenerMessage('setVideoPlayer', (result) => {
+      //   if (result?.content?.status == 'pause'){
+      //     handleLimitScreenRecord()
+      //   }
+      // })
 
-      // 安卓
-      postMessage({
-        api: 'limitScreenRecord',
-        content: {
-          type: 1
-        }
-      })
+      // // 安卓
+      // postMessage({
+      //   api: 'limitScreenRecord',
+      //   content: {
+      //     type: 1
+      //   }
+      // })
     })
 
-    onBeforeUnmount(() => {
-      postMessage({
-        api: 'limitScreenRecord',
-        content: {
-          type: 0
-        }
-      })
-    })
+    // onBeforeUnmount(() => {
+    //   postMessage({
+    //     api: 'limitScreenRecord',
+    //     content: {
+    //       type: 0
+    //     }
+    //   })
+    // })
 
     const playRef = ref()
     // 返回