vue-audio-recorder
by Gennady Grishkovtsov
HTML
<script src="https://unpkg.com/vue@2.5.16/dist/vue.js"></script>
<script src="https://unpkg.com/vue-audio-recorder@3.0.1/dist/vue-audio-recorder.min.js"></script>
<script src="https://unpkg.com/axios@0.18.0/dist/axios.min.js"></script>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>vue-audio-recorder | demo</title>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
</head>
<body>
<div id="app">
<audio-recorder
upload-url="some url"
:attempts="3"
:time="2"
:before-recording="callback"
:after-recording="callback"
:before-upload="callback"
:successful-upload="callback"
:failed-upload="callback"/>
</div>
</body>
</html>
JavaScript
Vue.prototype.$http = axios
Vue.use(VueAudioRecorder)
new Vue({
el: '#app',
components: {VueAudioRecorder},
methods: {
callback (msg) {
console.debug('Event: ', msg)
}
}
})