snail-player
一个h5视频播放器, 功能高度完善,基本满足使用。原生插件。仅供学习,禁止商用
Install
1,npm install snail-player --save
Usage
2,import VueSmsCode from 'snail-player'
3
// html
<div id='snailPlayWrapper'></div>
// vue:
this.$nextTick(() => {
new SnailPlayer({
el: '#snailPlayVideos', // 作用元素
src: require('@/assets/video2.mp4'), // 视频相对地址或者外部链接
autoplay: true, //是否自动播放
loop: true // 是否循环播放
})
})
// js
window.onload = function () {
new SnailPlayer({
el: '#snailPlayWrapper',
src: require('@/assets/video2.mp4'),
autoplay: true,
loop: true
})
}