0.1.3 • Published 4 years ago

vue-tiny-audio v0.1.3

Weekly downloads
67
License
-
Repository
github
Last release
4 years ago

vue-tiny-audio

A simple vue audio component build by vue-cli

Install

npm install vue-tiny-audio --save

Usage

<template>
  <tiny-audio :src="audioSrc"
    :title="audioTitle"
    ref="tinyAudio"
    @play="onPlay"
    @pause="onPause"
    @end="onEnd"
    @next="onNext"
    @previous="onPrevious">
  </tiny-audio>
</template>

<script>
import tinyAudio from 'vue-tiny-audio';
import 'vue-tiny-audio/lib/tinyAudio.css';

export default {
  components: {
    tinyAudio
  },
  data () {
    return {
      src: 'xxx',
      title: 'xxx',
      step: 10
    }
  }
}
</script>

props

proptypedefaultrequired
srcStringundefinedtrue
titleStringundefinedfalse
speedsArray1, 1.25, 1.5, 2false
stepNumber5false

events

eventdescription
playaudio start to play
pauseaudio pause
endaudio complete play
previousclick previous button
nextclick next button

slots

slotdescriptionscopeData
titlethe play material titletitle
controlthe audio all control DOMaudio(all the data you need)
timethe part of DOM which is related to timeaudio(all the data you need)
previousthe previous buttonnone
nextthe next buttonnone
backthe back buttonnone
forwardthe forward buttonnone
playOrPausethe play/pause buttonstatus(play/pause/waiting)
speedthe all DOM related to speed controlnone
speedLabelthe label of speed control DOMspeed
0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago