Test vue dplayer

A Vue 2.x video player component based on DPlayer

Version: 0.0.1 Updated: 08/10/2018

By: sinchang License: MIT

Downloads Last 30 Days: 14

Install

npm i test-vue-dplayer
yarn add test-vue-dplayer

Repository: https://github.com/sinchang/vue-dplayer

CDNs

bundle.run: https://bundle.run/test-vue-dplayer

jsDelivr: https://cdn.jsdelivr.net/npm/test-vue-dplayer

unpkg: https://unpkg.com/test-vue-dplayer

test-vue-dplayer

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

NPM version Vue 2.x NPM downloads

Live Demo

Install

npm install test-vue-dplayer -S

Usage

CDN: https://unpkg.com/vue-dplayer@latest/dist/

import VueDPlayer from 'test-vue-dplayer'
import 'test-vue-dplayer/dist/test-vue-dplayer.css'

export default {
  components: {
    'd-player': VueDPlayer
  }
}

Props

Options Doc

Name Type Default Description
options Object -- all player options

Events

Event binding Doc

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)
    }

License

This content is released under the MIT License.

Contributors



chenfx.cq
commits

DevDependencies


Categories: Vue js