mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-20 07:46:37 +00:00
Rename stream_type
to frontend_stream_type
(#10298)
This commit is contained in:
parent
a8ff98b808
commit
84533b8843
@ -52,7 +52,7 @@ class HaCameraStream extends LitElement {
|
|||||||
this.stateObj &&
|
this.stateObj &&
|
||||||
(changedProps.get("stateObj") as CameraEntity | undefined)?.entity_id !==
|
(changedProps.get("stateObj") as CameraEntity | undefined)?.entity_id !==
|
||||||
this.stateObj.entity_id &&
|
this.stateObj.entity_id &&
|
||||||
this.stateObj!.attributes.stream_type === STREAM_TYPE_HLS
|
this.stateObj!.attributes.frontend_stream_type === STREAM_TYPE_HLS
|
||||||
) {
|
) {
|
||||||
this._forceMJPEG = undefined;
|
this._forceMJPEG = undefined;
|
||||||
this._url = undefined;
|
this._url = undefined;
|
||||||
@ -84,7 +84,7 @@ class HaCameraStream extends LitElement {
|
|||||||
.alt=${`Preview of the ${computeStateName(this.stateObj)} camera.`}
|
.alt=${`Preview of the ${computeStateName(this.stateObj)} camera.`}
|
||||||
/>`;
|
/>`;
|
||||||
}
|
}
|
||||||
if (this.stateObj.attributes.stream_type === STREAM_TYPE_HLS && true) {
|
if (this.stateObj.attributes.frontend_stream_type === STREAM_TYPE_HLS) {
|
||||||
return this._url
|
return this._url
|
||||||
? html` <ha-hls-player
|
? html` <ha-hls-player
|
||||||
autoplay
|
autoplay
|
||||||
@ -97,7 +97,7 @@ class HaCameraStream extends LitElement {
|
|||||||
></ha-hls-player>`
|
></ha-hls-player>`
|
||||||
: html``;
|
: html``;
|
||||||
}
|
}
|
||||||
if (this.stateObj.attributes.stream_type === STREAM_TYPE_WEB_RTC) {
|
if (this.stateObj.attributes.frontend_stream_type === STREAM_TYPE_WEB_RTC) {
|
||||||
return html` <ha-web-rtc-player
|
return html` <ha-web-rtc-player
|
||||||
autoplay
|
autoplay
|
||||||
playsinline
|
playsinline
|
||||||
@ -123,7 +123,7 @@ class HaCameraStream extends LitElement {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.stateObj!.attributes.stream_type === STREAM_TYPE_WEB_RTC &&
|
this.stateObj!.attributes.frontend_stream_type === STREAM_TYPE_WEB_RTC &&
|
||||||
typeof RTCPeerConnection === "undefined"
|
typeof RTCPeerConnection === "undefined"
|
||||||
) {
|
) {
|
||||||
// Stream requires WebRTC but browser does not support, so fallback to
|
// Stream requires WebRTC but browser does not support, so fallback to
|
||||||
|
@ -17,7 +17,7 @@ interface CameraEntityAttributes extends HassEntityAttributeBase {
|
|||||||
access_token: string;
|
access_token: string;
|
||||||
brand: string;
|
brand: string;
|
||||||
motion_detection: boolean;
|
motion_detection: boolean;
|
||||||
stream_type: string;
|
frontend_stream_type: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CameraEntity extends HassEntityBase {
|
export interface CameraEntity extends HassEntityBase {
|
||||||
|
@ -86,7 +86,7 @@ class MoreInfoCamera extends LitElement {
|
|||||||
supportsFeature(this.stateObj!, CAMERA_SUPPORT_STREAM) &&
|
supportsFeature(this.stateObj!, CAMERA_SUPPORT_STREAM) &&
|
||||||
// The stream component for HLS streams supports a server-side pre-load
|
// The stream component for HLS streams supports a server-side pre-load
|
||||||
// option that client initiated WebRTC streams do not
|
// option that client initiated WebRTC streams do not
|
||||||
this.stateObj!.attributes.stream_type === STREAM_TYPE_HLS
|
this.stateObj!.attributes.frontend_stream_type === STREAM_TYPE_HLS
|
||||||
) {
|
) {
|
||||||
// Fetch in background while we set up the video.
|
// Fetch in background while we set up the video.
|
||||||
this._fetchCameraPrefs();
|
this._fetchCameraPrefs();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user