Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethercap/vue-tiny-audio
a vue tiny audio component
https://github.com/ethercap/vue-tiny-audio
Last synced: about 2 months ago
JSON representation
a vue tiny audio component
- Host: GitHub
- URL: https://github.com/ethercap/vue-tiny-audio
- Owner: ethercap
- Created: 2019-11-29T07:24:37.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T01:57:13.000Z (about 2 years ago)
- Last Synced: 2024-04-26T12:47:11.691Z (9 months ago)
- Language: JavaScript
- Size: 2.95 MB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-tiny-audio
A simple vue audio component build by vue-cli## Install
```
npm install vue-tiny-audio --save
```## Usage
```
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
}
}
}```
## props
|prop|type|default|required|
|:---:|:---:|:---:|:---:|
|src|String|undefined|true|
|title|String|undefined|false|
|speeds|Array|[1, 1.25, 1.5, 2]|false|
|step|Number|5|false|## events
|event|description|
|:---:|:---:|
|play|audio start to play|
|pause|audio pause|
|end|audio complete play|
|previous|click previous button|
|next|click next button|## slots
|slot|description|scopeData|
|:---:|:---:|:---:|
|title|the play material title|title|
|control|the audio all control DOM|audio(all the data you need)|
|time|the part of DOM which is related to time|audio(all the data you need)|
|previous|the previous button|none|
|next|the next button|none|
|back|the back button|none|
|forward|the forward button|none|
|playOrPause|the play/pause button|status(play/pause/waiting)|
|speed|the all DOM related to speed control|none|
|speedLabel|the label of speed control DOM|speed|