vue-dplayer-fixed
v0.0.14
Published
A Vue 2.x video player component based on DPlayer.PS: bugs fixed Version
Downloads
11
Readme
Vue-DPlayer-Fixed
A Vue 2.x video player component based on DPlayer PS: Fixed few Bugs Version.
Install
npm install vue-dplayer-fixed -S
Usage
CDN: https://unpkg.com/vue-dplayer@latest/dist/
import VueDPlayer from 'vue-dplayer'
import 'vue-dplayer/vue-dplayer.css'
export default {
components: {
'd-player': VueDPlayer
}
}
Props
| Name | Type | Default | Description | | ---- | ---- | ------- | ----------- | | options | Object | -- | all player options |
Events
Example:
<d-player @play="play"></d-player>
export default {
methods: {
play() {
console.log('play callback')
}
}
API
you can use all DPlayer APIs
Example:
<d-player ref="player"></d-player>
export default {
mounted() {
const player = this.$refs.player.dp
player.play()
setTimeout(() => {
player.pause()
}, 2000)
}
Related
License
This content is released under the MIT License.