"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[845],{80845:function(t,e,n){n.r(e),n.d(e,{default:function(){return k}});var o=n(20641);const r={class:"sound"},s={class:"sound-container"},a={key:0,autoplay:"",preload:"none",ref:"player"},u=["src"],i={class:"controls"};function c(t,e,n,c,d,l){return(0,o.uX)(),(0,o.CE)("div",r,[(0,o.Lk)("div",s,[d.recording?((0,o.uX)(),(0,o.CE)("audio",a,[(0,o.Lk)("source",{src:`/sound/stream.aac?t=${(new Date).getTime()}`},null,8,u),e[2]||(e[2]=(0,o.eW)(" Your browser does not support audio elements ",-1))],512)):(0,o.Q3)("",!0)]),(0,o.Lk)("div",i,[d.recording?((0,o.uX)(),(0,o.CE)("button",{key:1,type:"button",onClick:e[1]||(e[1]=(...t)=>l.stopRecording&&l.stopRecording(...t))},[...e[4]||(e[4]=[(0,o.Lk)("i",{class:"fa fa-stop"},null,-1),(0,o.eW)("  Stop streaming audio ",-1)])])):((0,o.uX)(),(0,o.CE)("button",{key:0,type:"button",onClick:e[0]||(e[0]=(...t)=>l.startRecording&&l.startRecording(...t))},[...e[3]||(e[3]=[(0,o.Lk)("i",{class:"fa fa-play"},null,-1),(0,o.eW)("  Start streaming audio ",-1)])]))])])}var d=n(91387),l={name:"Sound",mixins:[d.A],data(){return{recording:!1}},methods:{startRecording(){this.recording=!0},async stopRecording(){this.recording=!1,await this.request("sound.stop_recording")}}},p=n(66262);const g=(0,p.A)(l,[["render",c],["__scopeId","data-v-911495ca"]]);var k=g}}]);
//# sourceMappingURL=845.f7299597.js.map