platypush/platypush/backend/http/webapp/dist/static/js/746.d8626378.js

2 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";(self["webpackChunkplatypush"]=self["webpackChunkplatypush"]||[]).push([[746],{746:function(t,n,o){o.r(n),o.d(n,{default:function(){return h}});var e=o(6252);const r=t=>((0,e.dD)("data-v-911495ca"),t=t(),(0,e.Cn)(),t),s={class:"sound"},a={class:"sound-container"},i={key:0,autoplay:"",preload:"none",ref:"player"},c=["src"],d={class:"controls"},u=r((()=>(0,e._)("i",{class:"fa fa-play"},null,-1))),l=r((()=>(0,e._)("i",{class:"fa fa-stop"},null,-1)));function p(t,n,o,r,p,g){return(0,e.wg)(),(0,e.iD)("div",s,[(0,e._)("div",a,[p.recording?((0,e.wg)(),(0,e.iD)("audio",i,[(0,e._)("source",{src:`/sound/stream.aac?t=${(new Date).getTime()}`},null,8,c),(0,e.Uk)(" Your browser does not support audio elements ")],512)):(0,e.kq)("",!0)]),(0,e._)("div",d,[p.recording?((0,e.wg)(),(0,e.iD)("button",{key:1,type:"button",onClick:n[1]||(n[1]=(...t)=>g.stopRecording&&g.stopRecording(...t))},[l,(0,e.Uk)("  Stop streaming audio ")])):((0,e.wg)(),(0,e.iD)("button",{key:0,type:"button",onClick:n[0]||(n[0]=(...t)=>g.startRecording&&g.startRecording(...t))},[u,(0,e.Uk)("  Start streaming audio ")]))])])}var g=o(8637),k={name:"Sound",mixins:[g.Z],data(){return{recording:!1}},methods:{startRecording(){this.recording=!0},async stopRecording(){this.recording=!1,await this.request("sound.stop_recording")}}},f=o(3744);const y=(0,f.Z)(k,[["render",p],["__scopeId","data-v-911495ca"]]);var h=y}}]);
//# sourceMappingURL=746.d8626378.js.map