mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Disable SRTP for unifiprotect RTSPS stream (#129852)
This commit is contained in:
parent
e5263dc0c8
commit
e8c3539709
@ -206,7 +206,9 @@ class ProtectCamera(ProtectDeviceEntity, Camera):
|
||||
def _async_set_stream_source(self) -> None:
|
||||
channel = self.channel
|
||||
enable_stream = not self._disable_stream and channel.is_rtsp_enabled
|
||||
rtsp_url = channel.rtsps_url if self._secure else channel.rtsp_url
|
||||
# SRTP disabled because go2rtc does not support it
|
||||
# https://github.com/AlexxIT/go2rtc/#source-rtsp
|
||||
rtsp_url = channel.rtsps_no_srtp_url if self._secure else channel.rtsp_url
|
||||
source = rtsp_url if enable_stream else None
|
||||
self._attr_supported_features = _ENABLE_FEATURE if source else _DISABLE_FEATURE
|
||||
self._stream_source = source
|
||||
|
@ -196,7 +196,7 @@ async def validate_rtsps_camera_state(
|
||||
"""Validate a camera's state."""
|
||||
channel = camera_obj.channels[channel_id]
|
||||
|
||||
assert await async_get_stream_source(hass, entity_id) == channel.rtsps_url
|
||||
assert await async_get_stream_source(hass, entity_id) == channel.rtsps_no_srtp_url
|
||||
validate_common_camera_state(hass, channel, entity_id, features)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user