zhanghua
2022-12-13 a47e01d71ce4d416f8fd50e2ae16228d115b4104
src/views/video/index.vue
@@ -58,7 +58,6 @@
            preload="auto"
            width="400px"
            height="300px"
            :src="item.urlAddress"
            type="video/mp4"
          ></video>
          <div class="button-div">
@@ -137,16 +136,16 @@
          if (res.code === 0) {
            hls.loadSource(res.data);
            hls.attachMedia(video);
            hls.on(Hls.Events.MANIFEST_PARSED, function () {
              video.play();
              document.body.addEventListener(
                "click",
                function () {
                  video.play();
                },
                false
              );
            });
            // hls.on(Hls.Events.MANIFEST_PARSED, function () {
            //   video.play();
            //   document.body.addEventListener(
            //     "click",
            //     function () {
            //       video.play();
            //     },
            //     false
            //   );
            // });
            setTimeout(() => {
              video.play();
            }, 2000);