Improve video user experience by loading camera thumbnail as initial video background image (#13943)

This commit is contained in:
Allen Porter
2022-10-03 09:38:25 -07:00
committed by GitHub
parent 66bfdb6d12
commit 9c923e45c5
3 changed files with 33 additions and 5 deletions

View File

@@ -34,6 +34,8 @@ class HaWebRtcPlayer extends LitElement {
@property({ type: Boolean, attribute: "playsinline" })
public playsInline = false;
@property() public posterUrl!: string;
@state() private _error?: string;
// don't cache this, as we remove it on disconnects
@@ -54,6 +56,7 @@ class HaWebRtcPlayer extends LitElement {
.muted=${this.muted}
?playsinline=${this.playsInline}
?controls=${this.controls}
.poster=${this.posterUrl}
></video>
`;
}