mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-25 13:57:21 +00:00
Stop playing video when more info is closed (#3318)
This commit is contained in:
parent
203b14613f
commit
5a25627219
@ -26,9 +26,20 @@ class MoreInfoCamera extends LitElement {
|
||||
@property() public hass?: HomeAssistant;
|
||||
@property() public stateObj?: CameraEntity;
|
||||
@property() private _cameraPrefs?: CameraPreferences;
|
||||
@property() private _attached = false;
|
||||
|
||||
public connectedCallback() {
|
||||
super.connectedCallback();
|
||||
this._attached = true;
|
||||
}
|
||||
|
||||
public disconnectedCallback() {
|
||||
super.disconnectedCallback();
|
||||
this._attached = false;
|
||||
}
|
||||
|
||||
protected render(): TemplateResult | void {
|
||||
if (!this.hass || !this.stateObj) {
|
||||
if (!this._attached || !this.hass || !this.stateObj) {
|
||||
return html``;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user