platypush/platypush/backend/http/webapp/dist/static/js/4118.eb9d25ca.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([[4118],{4118:function(t,n,o){o.r(n),o.d(n,{default:function(){return b}});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=(0,e.Uk)(" Your browser does not support audio elements "),u={class:"controls"},l=r((()=>(0,e._)("i",{class:"fa fa-play"},null,-1))),p=(0,e.Uk)("  Start streaming audio "),g=[l,p],k=r((()=>(0,e._)("i",{class:"fa fa-stop"},null,-1))),f=(0,e.Uk)("  Stop streaming audio "),y=[k,f];function h(t,n,o,r,l,p){return(0,e.wg)(),(0,e.iD)("div",s,[(0,e._)("div",a,[l.recording?((0,e.wg)(),(0,e.iD)("audio",i,[(0,e._)("source",{src:`/sound/stream.aac?t=${(new Date).getTime()}`},null,8,c),d],512)):(0,e.kq)("",!0)]),(0,e._)("div",u,[l.recording?((0,e.wg)(),(0,e.iD)("button",{key:1,type:"button",onClick:n[1]||(n[1]=(...t)=>p.stopRecording&&p.stopRecording(...t))},y)):((0,e.wg)(),(0,e.iD)("button",{key:0,type:"button",onClick:n[0]||(n[0]=(...t)=>p.startRecording&&p.startRecording(...t))},g))])])}var w=o(6813),m={name:"Sound",mixins:[w.Z],data(){return{recording:!1}},methods:{startRecording(){this.recording=!0},async stopRecording(){this.recording=!1,await this.request("sound.stop_recording")}}},v=o(3744);const _=(0,v.Z)(m,[["render",h],["__scopeId","data-v-911495ca"]]);var b=_}}]);
//# sourceMappingURL=4118.eb9d25ca.js.map