插件名称 | vue-video-module |
---|---|
发布时间 | 2021年2月25日 |
插件作者 | iapYang |
一个为vue构建的简单,适合移动设备的视频组件。在IE 11 +,Chrome,firefox,ipad上正常工作。
npm install vue-video-module -D
Vue使用
// import
import Vue from 'vue';
import VueVideo from 'vue-video-module';
// require
var Vue = require('Vue');
var VueVideo = require('vue-video-module');
// mount with component
export default {
components: {
VueVideo,
},
};
在组件中使用
<div class="video-container">
<vue-video ref="video1" :options="videoOptions"></vue-video>
</div>
// e.g
videoOptions: {
src: 'http://vjs.zencdn.net/v/oceans.mp4',
poster: 'http://www.freemake.com/blog/wp-content/uploads/2015/06/videojs-logo.jpg',
controlBar: true,
spinner: 'circles',
fullscreen: true,
},