0.2.10 • Published 5 years ago

v-plr v0.2.10

Weekly downloads
31
License
MIT
Repository
github
Last release
5 years ago

v-plr

Build Status Coverage Status Version Downloads

Introduction

A easy-to-use vue video plugin

Install

Using npm:

$ npm install v-plr

Using yarn:

$ yarn add v-plr

Quick Start

<template>
  <v-video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" title="default controllers">
  <v-video src="http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4" 
    @onPlay="onPlay" @onPause="onPause" @onTimeupdate="onTimeupdate">
    <!--  add custom controllers here to cover default controllers -->
  </v-video>
</template>

<script>
import VVideo from 'v-plr'
Vue.use(VVideo)
export default {
  //...
  methods:{
    onPlay(){},
    onPause(){},
    onTimeupdate({ duration, currentTime, buffered }){}
  }
}
</script>

Use Component

Slider

<template>
  <v-slider v-model="curVal" width="400px" />
</template>

<script>
import { VSlider } from 'v-plr'
export default {
  //...
  data() {
    return { curVal: 50 }
  },
  components: { VSlider },
  methods: {}
}
</script>

Documentation

VVideo

Props

PropsDescriptionTypeDefaultRequired
srcThe url of video.String''true
ratioThe ratio of the video's width and height.Number16 / 9false
titleThe title of the default controllers.String''false

Events

EventsDescriptionParams
onLoadstartFires when media start to load.None
onLoadedmetadataFires when media meta data is loaded.None
onPlayFires when media play after last pause.None
onPauseFires when media pauseNone
onPlayingFires when media start to playNone
onTimeupdateFires when media currentTime changed{ duration, currentTime, buffered }
onWaitingFires when media is waiting for another opeationNone
onEndedFires when media is endedNone
onErrorFires when a error happenNone
onFullscreenChangeFires when the fullscreen status changed{ isFullscreen }

VSlider

Props

PropsDescriptionTypeDefaultRequired
minThe minimun value of slider.Number0false
maxThe maximum value of slider.Number100false
valueThe current value of slider.Number50false
heightThe height of slider block.Number/String40(px)false
widthThe width of slider block.Number/String100%false
bufferedThe value of slider buffered.Number0(min~max)false
seekColorThe background color of dragging block.String#eeeeeefalse
playedColorThe background color of the area between min and current value.String#ffe411false
bufferedColorThe background color of the area between min and buffered value.String#cfcfcffalse
progerssHeightThe height of the slider display block.Number3(px)false
btnBorderWidthThe border width of the slider buttonNumber2(px)false
btnBorderColorThe border color of the slider buttonStringgreyfalse

Events

EventsDescriptionParams
changeValueFires when the current value changed by manual manipulation.value

Changelog

Detailed changes for each release are documented in the release notes.

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago