var u=Object.defineProperty;var l=(r,e,a)=>e in r?u(r,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):r[e]=a;var m=(r,e,a)=>l(r,typeof e!="symbol"?e+"":e,a);import{m as p,C as _,f as g,R as f,j as d,k as h}from"./index-CBxrqwze.js";var v=Object.defineProperty,S=Object.getOwnPropertyDescriptor,i=(r,e,a,s)=>{for(var t=s>1?void 0:s?S(e,a):e,c=r.length-1,o;c>=0;c--)(o=r[c])&&(t=(s?o(e,a,t):o(t))||t);return s&&t&&v(e,a,t),t};let n=class extends p(_){constructor(){super(...arguments);m(this,"cameraImage");m(this,"cameraImageSource","")}startPlayback(){try{this.updateStatus("connecting");const a=this.buildAbsoluteUrl(this.camera.stream_url||"");a.searchParams.set("cacheBust",Date.now().toString()),this.cameraImageSource=a.toString(),this.updateRawCameraUrl(this.cameraImageSource)}catch(a){g.error(`[MjpegstreamerCamera] failed to start playback "${this.camera.name}"`,a)}}stopPlayback(){this.updateStatus("disconnected"),this.cameraImageSource="",this.cameraImage.src=""}};i([f("streamingElement")],n.prototype,"cameraImage",2);n=i([d({})],n);var C=function(){var e=this,a=e._self._c;return e._self._setupProxy,a("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(s){return e.updateStatus("connected")},error:function(s){return e.updateStatus("error")}}})},y=[],I=h(n,C,y,!1,null,null);const w=I.exports;export{w as default};
