Bail out early when no stream component (#2927)

This commit is contained in:
Paulus Schoutsen 2019-03-13 13:32:59 -07:00 committed by GitHub
parent 1451a78dd3
commit 92e6c5adfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,11 @@ class MoreInfoCamera extends UpdatingElement {
return;
}
if (!this.hass!.config.components.includes("stream")) {
this._renderMJPEG();
return;
}
const videoEl = document.createElement("video");
videoEl.style.width = "100%";
videoEl.autoplay = true;