diff --git a/README.md b/README.md index fd35dcb..78dfadf 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ The card supports the following configuration items: | image_click | string | | ['play', 'modal-play','modal-last'] | Action to perform when image is clicked. Remove attribute to play last recorded video when image is clicked. | | library_click | string | | ['modal'] | Action to perform when library image is clicked. Remove attribute to play last recorded video when image is clicked. | | modal_multiplier | float | 0.7 | float from 0.1 -> 1.0 | How big to make the modal window, as a fraction of the main window size. | +| auto_play | boolean | false | | If true, automatically start stream when card is viewed. | | door | string | entity_id | | Useful if the camera is pointed at a door. | | door_lock | string | entity_id | | | | door_bell | string | entity_id | | | diff --git a/dist/hass-aarlo.js b/dist/hass-aarlo.js index 13cea1f..240163e 100644 --- a/dist/hass-aarlo.js +++ b/dist/hass-aarlo.js @@ -58,9 +58,12 @@ class AarloGlance extends LitElement { this._change = 0; this._hls = null; this._dash = null; + this._video = null + this._stream = null - this.resetStatuses(); - this.resetVisiblity(); + this.resetConfig() + this.resetStatuses() + this.resetVisiblity() } static get styleTemplate() { @@ -227,9 +230,9 @@ class AarloGlance extends LitElement { render() { // calculate dimensions? - let width = window.innerWidth * this._v.modalMultiplier - let height = window.innerHeight * this._v.modalMultiplier - if ( this._v.aspectRatio === '1x1' ) { + let width = window.innerWidth * this._c.modalMultiplier + let height = window.innerHeight * this._c.modalMultiplier + if ( this._c.aspectRatio === '1x1' ) { height = Math.min(width,height) // noinspection JSSuspiciousNameCombination width = height @@ -305,7 +308,7 @@ class AarloGlance extends LitElement { -
+