"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[5193],{5193:function(n,t,r){r.r(t),r.d(t,{default:function(){return b}});var e=r(6252),o=function(n){return(0,e.dD)("data-v-30d09191"),n=n(),(0,e.Cn)(),n},u={class:"sound"},a={class:"sound-container"},i={key:0,autoplay:"",preload:"none",ref:"player"},s=["src"],c=(0,e.Uk)(" Your browser does not support audio elements "),d={class:"controls"},p=o((function(){return(0,e._)("i",{class:"fa fa-play"},null,-1)})),l=(0,e.Uk)("  Start streaming audio "),f=[p,l],g=o((function(){return(0,e._)("i",{class:"fa fa-stop"},null,-1)})),k=(0,e.Uk)("  Stop streaming audio "),y=[g,k];function m(n,t,r,o,p,l){return(0,e.wg)(),(0,e.iD)("div",u,[(0,e._)("div",a,[p.recording?((0,e.wg)(),(0,e.iD)("audio",i,[(0,e._)("source",{src:"/sound/stream?t=".concat((new Date).getTime()),type:"audio/x-wav;codec=pcm"},null,8,s),c],512)):(0,e.kq)("",!0)]),(0,e._)("div",d,[p.recording?((0,e.wg)(),(0,e.iD)("button",{key:1,type:"button",onClick:t[1]||(t[1]=function(){return l.stopRecording&&l.stopRecording.apply(l,arguments)})},y)):((0,e.wg)(),(0,e.iD)("button",{key:0,type:"button",onClick:t[0]||(t[0]=function(){return l.startRecording&&l.startRecording.apply(l,arguments)})},f))])])}var w=r(8534),v=(r(5666),r(2628)),h={name:"Sound",mixins:[v.Z],data:function(){return{recording:!1}},methods:{startRecording:function(){this.recording=!0},stopRecording:function(){var n=this;return(0,w.Z)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n.recording=!1,t.next=3,n.request("sound.stop_recording");case 3:case"end":return t.stop()}}),t)})))()}}},R=r(3744);const _=(0,R.Z)(h,[["render",m],["__scopeId","data-v-30d09191"]]);var b=_}}]);
//# sourceMappingURL=5193-legacy.60b8c4f6.js.map