Fix streaming: MSE-first with go2rtc init protocol
- Switch from WebRTC-first to MSE-first streaming (more reliable
across all camera types including high-res IP cameras)
- Send required {"type":"mse"} init message to go2rtc WebSocket
- Fix infinite re-render loop in configStore (pre-compute enabled
cameras instead of deriving in selector)
- Fix mqtt_bridge global variable scope in broadcast()
- Add React ErrorBoundary for visible crash reporting
- Remove unused go2rtcUrl dependency from useStream hook
This commit is contained in:
@@ -23,6 +23,7 @@ def unregister_ws_client(ws):
|
||||
|
||||
|
||||
async def broadcast(message: dict):
|
||||
global _ws_clients
|
||||
data = json.dumps(message)
|
||||
disconnected = set()
|
||||
for ws in _ws_clients:
|
||||
@@ -30,7 +31,8 @@ async def broadcast(message: dict):
|
||||
await ws.send_text(data)
|
||||
except Exception:
|
||||
disconnected.add(ws)
|
||||
_ws_clients -= disconnected
|
||||
if disconnected:
|
||||
_ws_clients -= disconnected
|
||||
|
||||
|
||||
async def mqtt_listener():
|
||||
|
||||
Reference in New Issue
Block a user