jdy-player
A Vue 2.x video player component based on DPlayer.
Install
npm install jdy-player -S
Props
Name | Type | Default | Description |
---|---|---|---|
options | Object | -- | all player options |
Events
Example:
<jdy-player @play="play"></jdy-player>
export default {
methods: {
play() {
console.log('play callback')
}
}
API
you can use all DPlayer APIs
Example:
<jdy-player ref="player"></jdy-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.