mirror of
https://github.com/home-assistant/frontend.git
synced 2025-04-26 06:17:20 +00:00
Fix for Nest WebRTC cams to not require stream component (#10432)
This commit is contained in:
parent
4b44e197ae
commit
5ef7a37c20
@ -115,23 +115,18 @@ class HaCameraStream extends LitElement {
|
|||||||
// Fallback when unable to fetch stream url
|
// Fallback when unable to fetch stream url
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (
|
if (!supportsFeature(this.stateObj!, CAMERA_SUPPORT_STREAM)) {
|
||||||
!isComponentLoaded(this.hass!, "stream") ||
|
|
||||||
!supportsFeature(this.stateObj!, CAMERA_SUPPORT_STREAM)
|
|
||||||
) {
|
|
||||||
// Steaming is not supported by the camera so fallback to MJPEG stream
|
// Steaming is not supported by the camera so fallback to MJPEG stream
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
this.stateObj!.attributes.frontend_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
|
// Browser support required for WebRTC
|
||||||
// MJPEG stream.
|
return typeof RTCPeerConnection === "undefined";
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
// Render stream
|
// Server side stream component required for HLS
|
||||||
return false;
|
return !isComponentLoaded(this.hass!, "stream");
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _getStreamUrl(): Promise<void> {
|
private async _getStreamUrl(): Promise<void> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user