inleft
2022-08-30 271ca6cb0ee2ff0a789bf74d1821e7891a7043bb
src/components/mini/box15-videoPlayBox.vue
@@ -51,12 +51,14 @@
<script>
   import Hls from 'hls.js'
   import DPlayer from 'dplayer'
   import myConstant from "../../config/myConstant.js"
   export default {
      data() {
         return {
            disabledPointer: false,
            dp: null,
            hls: null,
            playHistory: [],
            playRecordIds: [],
            volumeInit: 0.1,
@@ -65,13 +67,12 @@
            currentTime: 0,
            duration: 0,
            playingVideoData: {
               pic: "http://t.inleft.com/share/media_photo/idea_beijing.jpg",
               pic: "",
               url: "",
               type: "normal",
               title: "",
               id: ""
            },
            hls: null,
         }
      },
      mounted() {
@@ -173,12 +174,16 @@
               return
            }
            if (videoData.url != null && videoData.urlL != "" && videoData.url.endsWith("m3u8")) {
            if (videoData.url != null && videoData.url != "" && videoData.url.endsWith("m3u8")) {
               videoData.type = "customHls";
            } else {
               videoData.type = "normal";
            }
            if (videoData.pic === null || videoData.pic == ''){
               videoData.pic = myConstant.defaultBGVideo;
            }
            //重要!!防止hls类型视频在切换后不停在后台缓存
            if (this.hls != null) {
               this.hls.destroy();