Better fullscreen logic and HA frontend fix.

This commit is contained in:
Dermot Duffy
2021-09-30 22:46:10 -07:00
parent 6f65f3796e
commit 3c10b329a2
3 changed files with 26 additions and 17 deletions
+7 -2
View File
@@ -43,15 +43,20 @@ customElements.whenDefined('ha-camera-stream').then(() => {
return html``;
}
// Below .src binding tweaked to work pre/post:
// - https://github.com/home-assistant/frontend/commit/e963735dbabdc2fea8a95aea325952560c727625
return html`
${this._shouldRenderMJPEG
? html`
<img
@load=${(e) => {
this._elementResized();
dispatchMediaLoadEvent(this, e);
}}
.src=${computeMJPEGStreamUrl(this.stateObj)}
.src=${
(typeof this._connected == 'undefined' ||
this._connected)
? computeMJPEGStreamUrl(this.stateObj)
: ''}
.alt=${`Preview of the ${computeStateName(this.stateObj)} camera.`}
/>
`