<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>&nbsp; Start streaming audio
            </button>

            <button type="button" @click="stopRecording" v-else>
                <i class="fa fa-stop"></i>&nbsp; Stop streaming audio
            </button>
        </div>
    </div>
</script>

