mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-19 10:21:14 +03:00
dynamic ws/wss selection
This commit is contained in:
parent
cf2e33bdc2
commit
1b78912759
@ -34,7 +34,7 @@ export function MqttProvider({
|
|||||||
config,
|
config,
|
||||||
children,
|
children,
|
||||||
createWebsocket = defaultCreateWebsocket,
|
createWebsocket = defaultCreateWebsocket,
|
||||||
mqttUrl = `${baseUrl.replace(/^https?:/, 'ws:')}/ws`,
|
mqttUrl = `${baseUrl.replace(/^http/, 'ws')}/ws`,
|
||||||
}) {
|
}) {
|
||||||
const [state, dispatch] = useReducer(reducer, initialState);
|
const [state, dispatch] = useReducer(reducer, initialState);
|
||||||
const wsRef = useRef();
|
const wsRef = useRef();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user