bill 2 سال پیش
والد
کامیت
30677d1716
1فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 7 2
      src/views/guide/sign.vue

+ 7 - 2
src/views/guide/sign.vue

@@ -27,7 +27,7 @@
 
 <script setup lang="ts">
 import { Guide, getGuidePaths } from '@/store'
-import { getFileUrl } from '@/utils'
+import { getFileUrl, saveAs } from '@/utils'
 import { getResource } from '@/env'
 import { computed, watchEffect, nextTick } from 'vue';
 import { playSceneGuide, isScenePlayIng, pauseSceneGuide } from '@/sdk'
@@ -56,7 +56,7 @@ const actions = {
     const config: any = {
       uploadUrl: '',
       resolution: '4k',
-      autoDownload: true,
+      autoDownload: false,
       debug: false,
     }
   
@@ -68,6 +68,11 @@ const actions = {
       stopWatch && stopWatch()
       pauseSceneGuide()
     }
+
+    videoRecorder.on('record', blob => {
+      saveAs(new File([blob], '录屏.mp4', { type: 'video/mp4; codecs=h264' }), props.guide.title + ".mp4")
+    })
+
     videoRecorder.off('*')
     videoRecorder.on('startRecord', () => {
       playSceneGuide(paths.value, undefined, true)