Skip to content
This repository was archived by the owner on Jun 6, 2020. It is now read-only.

MoePlayer/vue-dplayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vue-DPlayer

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

NPM version Vue 2.x NPM downloads

Live Demo

Install

npm install vue-dplayer -S

Usage

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

import VueDPlayer from 'vue-dplayer' import 'vue-dplayer/dist/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) }

Related

License

This content is released under the MIT License.

About

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

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •