22 lines
752 B
HTML
22 lines
752 B
HTML
<script type="text/x-template" id="tmpl-sound">
|
|
<div class="sound">
|
|
<div class="sound-container">
|
|
<audio autoplay preload="none" ref="player" v-if="recording">
|
|
<source src="/sound/stream" type="audio/x-wav;codec=pcm">
|
|
Your browser does not support audio elements
|
|
</audio>
|
|
</div>
|
|
|
|
<div class="controls">
|
|
<button type="button" @click="startRecording" v-if="!recording">
|
|
<i class="fa fa-play"></i> Start streaming audio
|
|
</button>
|
|
|
|
<button type="button" @click="stopRecording" v-else>
|
|
<i class="fa fa-stop"></i> Stop streaming audio
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</script>
|
|
|