mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
dynamic ws/wss selection
This commit is contained in:
parent
4a74f295e7
commit
31d408a746
@ -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