Skip to content

VideoPlayer 视频播放器组件

基于 xgplayer 二次封装的视频播放器

VideoPlayer 组件位于 src/components/VideoPlayer

用法

vue
<script lang="ts" setup>
import { VideoPlayer } from '@/components/VideoPlayer'
</script>

<template>
  <VideoPlayer
    url="//sf1-cdn-tos.huoshanstatic.com/obj/media-fe/xgplayer_doc_video/mp4/xgplayer-demo-720p.mp4"
    poster="//lf3-static.bytednsdoc.com/obj/eden-cn/nupenuvpxnuvo/xgplayer_doc/poster.jpg"
  />
</template>

VideoPlayer 属性

属性说明类型可选值默认值
url视频的地址string--
poster视频的封面string--