Bladeren bron

fix: 重播修改

linjw 2 maanden geleden
bovenliggende
commit
77e52b3539

+ 1 - 1
src/components/XGVideoViewer/hooks/useInitPlayer.js

@@ -124,7 +124,7 @@ const useInitPlayer = (props, emits) => {
         if (historyListRef.value[0] === props.videoUrl) {
           return true
         } else {
-          emits('reload', historyListRef.value[0])
+          emits("onReload", historyListRef.value[0])
           return false
         }
       })

+ 1 - 1
src/components/XGVideoViewer/index.vue

@@ -41,7 +41,7 @@ export default {
 import { watch } from "vue";
 import useInitPlayer from "./hooks/useInitPlayer";
 
-const emits = defineEmits("onClickOption", "onFullscreenChange", 'reload');
+const emits = defineEmits("onClickOption", "onFullscreenChange", "onReload")
 
 const props = defineProps({
   // 问题

+ 2 - 2
src/views/interactVideo/videoManage/index.vue

@@ -107,7 +107,7 @@
         :autoplayMuted="false"
         :poster="videoDetail.data.image"
         @onClickOption="onClickOption"
-        @reload="reload"
+        @onReload="reload"
       />
     </el-dialog>
   </div>
@@ -254,7 +254,7 @@ const onClickOption = (option) => {
 
 // 重播返回第一个视频
 const reload = (url) => {
-  let videoData = videoSource.value.filter((i) => i.data && i.data.url === url)[0]
+  let videoData = videoSource.value.filter((i) => i.data && i.data.uri === url)[0]
   videoDetail.value = videoData
 }