zhouwx
2024-08-05 4f6cdee3d3a9967b6955aacc354bf557430c0643
src/views/onlineEducation/courseManage/courseResource/componets/viewVideo.vue
@@ -9,8 +9,8 @@
        :close-on-press-escape="false"
        :close-on-click-modal="false"
    >
      <div style="text-align: center">
        <video v-if="showVideo" ref="videoPlayer" class="video-js" style="margin: auto auto"></video>
      <div style="text-align: center" v-if="showVideo">
        <video  ref="videoPlayer" class="video-js" style="margin: auto auto"></video>
      </div>
    </el-dialog>
  </div>
@@ -42,7 +42,7 @@
        autoplay:true,//自动播放
        sources: [
          {
            src: resourcePath.value ? "http://192.168.2.16:9000/trainexam/" + resourcePath.value : '',
            src: resourcePath.value ? import.meta.env.VITE_APP_RESOURCE_API + resourcePath.value : '',
            // src:'',
            type: 'application/x-mpegURL',
          }
@@ -81,9 +81,13 @@
  getVideo();
}
const handleClose = () => {
  // if(myPlayer.value){
  //   myPlayer.value.dispose();
  //   resourcePath.value = ''
  // }
  showVideo.value = false;
  resourcePath.value = '';
  dialogVisible.value = false;
  emit("getList")