vue前端采用videojs模块,实现rtmp视频流播放
node安装videojs和videojs-flash模块npm install video.jsvideojs-flashvue引入模块和样式<template><videoid="my-player"class="video-js"controlspreload="auto"poster="//vjs.zencd...
·
node安装videojs和videojs-flash模块
npm install video.js videojs-flash
vue引入模块和样式
<template>
<video
id="my-player"
class="video-js"
controls
preload="auto"
poster="//vjs.zencdn.net/v/oceans.png"
data-setup='{}'>
<source src=" " type="rtmp/mp4"></source>
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a
web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank">
supports HTML5 video
</a>
</p>
</video>
</template>
<script>
import videojs from 'video.js';
import "videojs-flash"
import "video.js/dist/video-js.min.css"
export default {
name: "VideoPlay",
}
</script>
更多推荐
已为社区贡献4条内容
所有评论(0)