vue3直播视频流easy-player

<script src="/easyPlayer/EasyPlayer-element.min.js"></script>

 easyPlayer文件下载地址

https://download.csdn.net/download/weixin_42120669/89605739 

<template>
  <div class="container">
 
    <div style="width: 90vw;height: 90vh;">
      <easy-player
                    muted
                    aspect="16:9"
                    :autoplay="true"
                    :fluent="true"
                    :video-url="videoOptions.src"
                    live
                    stretch
                  />
    </div>
    
  </div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, computed } from 'vue';
const videoOptions = reactive({
  src: "https://open.ys7.com/v3/openlive/33010718992817239405:33010691991327413475_1_1.m3u8?expire=1752744590&id=735549178981507072&t=c974322b0d61050dfd575f772e8a25e3621bb65f26cc61f331deca0bf3dd892c&ev=100&devProto=gb28181", //视频源
  type: "m3u8", //视频类型
});
 
</script>
 

Logo

前往低代码交流专区

更多推荐