From 4b80e89973960907915dedddbd73fd2dd4578261 Mon Sep 17 00:00:00 2001
From: du <13220750630.163.com>
Date: 星期二, 01 四月 2025 14:30:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 easegen-front/src/components/DiyEditor/components/mobile/VideoPlayer_mov/index.vue |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/easegen-front/src/components/DiyEditor/components/mobile/VideoPlayer_mov/index.vue b/easegen-front/src/components/DiyEditor/components/mobile/VideoPlayer_mov/index.vue
index 0adf76d..712c648 100644
--- a/easegen-front/src/components/DiyEditor/components/mobile/VideoPlayer_mov/index.vue
+++ b/easegen-front/src/components/DiyEditor/components/mobile/VideoPlayer_mov/index.vue
@@ -1,46 +1,52 @@
 <!-- 閽堝mov瑙嗛鐨勮棰戝鐞� -->
 <template>
-  <div class="w-full" :style="{ height: `${property.style.height}px` }">
-    <el-image class="w-full w-full" :src="property.posterUrl" v-if="property.posterUrl" />
+  <div class="w-full" :style="{ height: `${property.style.height}px` }" v-loading="VideoUrl===''" >
     <!-- :src="TakeUrl('/public/mov/processed_video.mov')" -->
     <video
       :style="{ height: `${property.style.height}px` }"
-      v-else
       class="w-full w-full"
-      :src=" TakeUrl(property.videoUrl) "
       :poster="property.posterUrl"
       :autoplay="property.autoplay"
+      :src="VideoUrl"
       controls
       ref="videoRef"
     ></video>
   </div>
 </template>
 <script setup lang="ts">
-import { ref } from "vue";
+import { ref, onMounted } from 'vue'
 import { VideoPlayerProperty } from './config'
 
-import { MoveToMp4 } from "@/utils/MovToMp4"
+import { MoveToMp4 } from '@/utils/MovToMp4'
 
 const videoRef = ref()
+
+const isLoading = ref(true)
+
+// 褰撳墠瑙嗛鐨勮棰戝湴鍧�
+const VideoUrl = ref("")
 
 /** 瑙嗛鎾斁 */
 defineOptions({ name: 'VideoPlayer' })
 
-defineProps<{ property: VideoPlayerProperty }>()
+const Url = defineProps<{ property: VideoPlayerProperty }>()
 
 // 瑙嗛鏂囦欢鍦板潃澶勭悊
 
-const TakeUrl = async (url:string) => {
-  let fileType = String( url.slice( url.lastIndexOf(".")+1 ) )
-  if( fileType === 'mov' ){
-    let file = await MoveToMp4( url )
-    videoRef.value.src = file
-  }else{
-    videoRef.value.src = url
-  }
-  
+const TakeUrl = async () => {
+    const url = Url.property.videoUrl
+    let fileType = String(url.slice(url.lastIndexOf('.') + 1))
+    if (fileType === 'mov') {
+      let file = await MoveToMp4(url)
+        VideoUrl.value = file
+    } else {
+        VideoUrl.value = url
+    }
 }
 
+onMounted( ()=>{
+  TakeUrl()
+} )
 
 </script>
 

--
Gitblit v1.9.3