lsc 4 days ago
parent
commit
da390b6e27

+ 2 - 0
src/views/components/element/FrameElement/BaseFrameElement.vue

@@ -20,6 +20,7 @@
           :height="elementInfo.height"
           :frameborder="0" 
           :allowfullscreen="true"
+          allow="camera *; microphone *;display-capture;midi;encrypted-media;fullscreen;"
         ></iframe>
         <iframe 
           :key="`src-${iframeKey}`"
@@ -29,6 +30,7 @@
           :height="elementInfo.height"
           :frameborder="0" 
           :allowfullscreen="true"
+          allow="camera *; microphone *;display-capture;midi;encrypted-media;fullscreen;"
         ></iframe>
 
         <!-- 在放映模式下不显示遮罩层,允许用户与iframe交互 -->

+ 4 - 1
src/views/components/element/FrameElement/index.vue

@@ -22,13 +22,16 @@
           :width="elementInfo.width"
           :height="elementInfo.height"
           :frameborder="0" 
-          :allowfullscreen="true"></iframe>
+          :allowfullscreen="true"
+          allow="camera *; microphone *;display-capture;midi;encrypted-media;fullscreen;"
+        ></iframe>
         <iframe v-else
           :src="elementInfo.url"
           :width="elementInfo.width"
           :height="elementInfo.height"
           :frameborder="0" 
           :allowfullscreen="true"
+          allow="camera *; microphone *;display-capture;midi;encrypted-media;fullscreen;"
         ></iframe>
 
         <div class="drag-handler top"></div>