插件名称 | vue-audio-recorder |
---|---|
发布时间 | 2020年8月26日 |
插件作者 | grishkovelli |
Vue.js的录音机。它允许在服务器上创建,播放,下载和存储记录。
# NPM
$ npm install vue-audio-recorder --save
import AudioRecorder from 'vue-audio-recorder'
Vue.use(AudioRecorder)
methods: {
callback (data) {
console.debug(data)
}
}
<audio-recorder
upload-url="YOUR_API_URL"
:attempts="3"
:time="2"
:headers="headers"
:before-recording="callback"
:pause-recording="callback"
:after-recording="callback"
:select-record="callback"
:before-upload="callback"
:successful-upload="callback"
:failed-upload="callback"/>
<audio-player src="/demo/example.mp3"/>
官网:https://github.com/grishkovelli/vue-audio-recorder
演示:https://www.vue365.cn/code_demo.php?id=1890
GitHub下载:https://github.com/grishkovelli/vue-audio-recorder/archive/master.zip