vue-videojs-aliplay
v1.0.2
Published
使用video.js的ui来定义aliplayer
Downloads
7
Maintainers
Readme
videojs-aliplayer
Table of Contents
Installation
npm install --save videojs-aliplayer
Usage
<template>
<vue-ali-video
:options="options"
@ready="onReady"
@timeupdate="onTimeupdate"
></vue-ali-video>
</template>
<script>
export default {
data() {
return {
options: {
autoplay: true,
isLive: false,
dots: [
{
timeSecond: 1,
tooltip: '答题卡'
},
{
timeSecond: 3,
tooltip: '答题卡'
},
],
playbackRates: ['2.0', '1.5', '1.0'],
sources: [
{
src: 'https://vjs.zencdn.net/v/oceans.mp4',
label: '流畅',
definition: 'FD'
}
]
}
}
},
methods: {
onReady(player) {
this.ready = true
this.player = player
console.log('onReady')
},
onTimeupdate() {
this.currentTime = this.player.currentTime()
console.log(this.currentTime)
}
}
}
</script>
License
MIT. Copyright (c) weilaihui