mirror of
https://github.com/kevin-DL/vue-audio-recorder.git
synced 2026-01-11 19:04:28 +00:00
Add existing code
This commit is contained in:
21
demo/index.html
Normal file
21
demo/index.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!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"
|
||||
:start-record="callback"
|
||||
:stop-record="callback"
|
||||
:start-upload="callback"
|
||||
:successful-upload="callback"
|
||||
:failed-upload="callback"/>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
16
demo/index.js
Normal file
16
demo/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import AudioRecorder from '../src/audio-recorder'
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$http = axios
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
components: {AudioRecorder},
|
||||
methods: {
|
||||
callback (msg) {
|
||||
console.debug('Event: ', msg)
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user