import{a as e,l as t,n,t as r,u as i}from"./_plugin-vue2_normalizer-Vm4EDAeQ.js";import{t as a}from"./browser-1D2tZwAR.js";import{t as o}from"./camera-DKiOc18c.js";var s=class extends i(o){cameraImage;cameraImageSource=``;startPlayback(){try{this.updateStatus(`connecting`);let e=this.buildAbsoluteUrl(this.camera.stream_url||``);e.searchParams.set(`cacheBust`,Date.now().toString()),this.cameraImageSource=e.toString(),this.updateRawCameraUrl(this.cameraImageSource)}catch(e){a.error(`[Uv4LMjpegCamera] failed to start playback "${this.camera.name}"`,e)}}stopPlayback(){this.updateStatus(`disconnected`),this.cameraImageSource=``,this.cameraImage.src=``}};n([e(`streamingElement`)],s.prototype,`cameraImage`,void 0),s=n([t({})],s);var c=r(s,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(`img`,{directives:[{name:`show`,rawName:`v-show`,value:e.status===`connected`,expression:`status === 'connected'`}],ref:`streamingElement`,style:e.cameraStyle,attrs:{src:e.cameraImageSource,crossorigin:e.crossorigin},on:{load:function(t){return e.updateStatus(`connected`)},error:function(t){return e.updateStatus(`error`)}}})},[],!1,null,null,null,null).exports;export{c as default};