camera: workaround for webrtc if there is a stream close #1133

This commit is contained in:
alfrix 2023-12-23 17:30:52 -03:00
parent 34f80ce4aa
commit 4a928140d9

View File

@ -50,6 +50,9 @@ class Panel(ScreenPanel):
logging.info("camera URL is relative")
endpoint = self._screen.apiclient.endpoint.split(':')
url = f"{endpoint[0]}:{endpoint[1]}{url}"
if '/webrtc' in url:
self._screen.show_popup_message(_('WebRTC is not supported by the backend trying Stream'))
url = url.replace('/webrtc', '/stream')
vf = ""
if cam["flip_horizontal"]:
vf += "hflip,"