1.2.10 • Published 2 years ago

jdy-player v1.2.10

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

jdy-player

A Vue 2.x video player component based on DPlayer.

Install

npm install jdy-player -S

Props

Options Doc

NameTypeDefaultDescription
optionsObject--all player options

Events

Event binding Doc

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.