Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/components/ha-camera-stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class HaCameraStream extends LitElement {
@property({ type: Boolean, attribute: "muted" })
public muted = false;

@property({ type: Boolean, attribute: "allow-exoplayer" })
public allowExoPlayer = false;

// We keep track if we should force MJPEG with a string
// that way it automatically resets if we change entity.
@internalProperty() private _forceMJPEG?: string;
Expand Down Expand Up @@ -61,6 +64,7 @@ class HaCameraStream extends LitElement {
<ha-hls-player
autoplay
playsinline
.allowExoPlayer=${this.allowExoPlayer}
.muted=${this.muted}
.controls=${this.controls}
.hass=${this.hass}
Expand Down
5 changes: 4 additions & 1 deletion src/components/ha-hls-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class HaHLSPlayer extends LitElement {
@property({ type: Boolean, attribute: "playsinline" })
public playsInline = false;

@property({ type: Boolean, attribute: "allow-exoplayer" })
public allowExoPlayer = false;

@query("video") private _videoEl!: HTMLVideoElement;

@internalProperty() private _attached = false;
Expand Down Expand Up @@ -91,7 +94,7 @@ class HaHLSPlayer extends LitElement {
}

private async _getUseExoPlayer(): Promise<boolean> {
if (!this.hass!.auth.external) {
if (!this.hass!.auth.external || !this.allowExoPlayer) {
return false;
}
const externalConfig = await getExternalConfig(this.hass!.auth.external);
Expand Down
1 change: 1 addition & 0 deletions src/dialogs/more-info/controls/more-info-camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class MoreInfoCamera extends LitElement {
<ha-camera-stream
.hass=${this.hass}
.stateObj=${this.stateObj}
allow-exoplayer
controls
></ha-camera-stream>
${this._cameraPrefs
Expand Down