mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-09 16:22:48 +03:00
Live streaming tech selection (#24374)
* allow users to select live streaming technology * fix webrtc being downgraded to mse on load `useUserPersistence` seeds state with the default and loads asynchronously, so the first render always used `mse` instead of the saved choice, and `useWebRTCGloballyAvailable` reports `checking` until the probe settles and re-enters that state on every consumer mount, so a saved `webrtc` was rewritten to `mse` even after the probe had already passed. On Safari the MSE player then timed out and latched the jsmpeg fallback. A pending probe now counts as available, the player waits on `autoLive` until the stored preferences load, and `handleError` gates on the mode in use since the fallback flag no longer implies webrtc is untried. A rejected IndexedDB read also resolves `loaded` now, so a blocked store can't leave the player waiting forever. * add support for configurable ICE servers in WebRTC player * add mic error state, fix dialog overwriting saved choice and dashboard ignoring stream * tweaks
This commit is contained in:
@@ -185,7 +185,12 @@ export function useUserPersistence<S>(
|
||||
setLoaded(true);
|
||||
}
|
||||
|
||||
loadWithMigration();
|
||||
// Consumers gate on this flag and the state already holds the defaults,
|
||||
// so a rejected read must still resolve to "loaded".
|
||||
loadWithMigration().catch(() => {
|
||||
loadedKeyRef.current = namespacedKey;
|
||||
setLoaded(true);
|
||||
});
|
||||
}, [
|
||||
auth.isLoading,
|
||||
isAuthenticated,
|
||||
|
||||
Reference in New Issue
Block a user