Sfoglia il codice sorgente

修复视频播放时断网,重新链接之后不能播放的问题

lex 1 anno fa
parent
commit
9152b3eeb4
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/views/coursewarePlay/component/video-play.tsx

+ 2 - 1
src/views/coursewarePlay/component/video-play.tsx

@@ -161,6 +161,7 @@ export default defineComponent({
 
     const __initVideo = () => {
       if (videoItem.value && props.item.id) {
+        console.log(videoItem.value, 'videoItem.value');
         nextTick(() => {
           videoItem.value?.currentTime(0);
         });
@@ -275,7 +276,7 @@ export default defineComponent({
       clearTimeout(videoErrorTimer);
       nextTick(() => {
         videoErrorTimer = setTimeout(() => {
-          videoItem.value.src = props.item?.content;
+          videoItem.value.src(props.item?.content);
           emit('play');
           videoItem.value.load();
           // eslint-disable-next-line @typescript-eslint/no-unused-vars