mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +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 &&
|
||||
(changedProps.get("stateObj") as CameraEntity | undefined)?.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._url = undefined;
|
||||
@ -84,7 +84,7 @@ class HaCameraStream extends LitElement {
|
||||
.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
|
||||
? html` <ha-hls-player
|
||||
autoplay
|
||||
@ -97,7 +97,7 @@ class HaCameraStream extends LitElement {
|
||||
></ha-hls-player>`
|
||||
: 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
|
||||
autoplay
|
||||
playsinline
|
||||
@ -123,7 +123,7 @@ class HaCameraStream extends LitElement {
|
||||
return true;
|
||||
}
|
||||
if (
|
||||
this.stateObj!.attributes.stream_type === STREAM_TYPE_WEB_RTC &&
|
||||
this.stateObj!.attributes.frontend_stream_type === STREAM_TYPE_WEB_RTC &&
|
||||
typeof RTCPeerConnection === "undefined"
|
||||
) {
|
||||
// Stream requires WebRTC but browser does not support, so fallback to
|
||||
|
@ -17,7 +17,7 @@ interface CameraEntityAttributes extends HassEntityAttributeBase {
|
||||
access_token: string;
|
||||
brand: string;
|
||||
motion_detection: boolean;
|
||||
stream_type: string;
|
||||
frontend_stream_type: string;
|
||||
}
|
||||
|
||||
export interface CameraEntity extends HassEntityBase {
|
||||
|
@ -86,7 +86,7 @@ class MoreInfoCamera extends LitElement {
|
||||
supportsFeature(this.stateObj!, CAMERA_SUPPORT_STREAM) &&
|
||||
// The stream component for HLS streams supports a server-side pre-load
|
||||
// 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.
|
||||
this._fetchCameraPrefs();
|
||||
|
Loading…
x
Reference in New Issue
Block a user