forked from Github/frigate
dynamic ws/wss selection
This commit is contained in:
@@ -34,7 +34,7 @@ export function MqttProvider({
|
||||
config,
|
||||
children,
|
||||
createWebsocket = defaultCreateWebsocket,
|
||||
mqttUrl = `${baseUrl.replace(/^https?:/, 'ws:')}/ws`,
|
||||
mqttUrl = `${baseUrl.replace(/^http/, 'ws')}/ws`,
|
||||
}) {
|
||||
const [state, dispatch] = useReducer(reducer, initialState);
|
||||
const wsRef = useRef();
|
||||
|
||||
Reference in New Issue
Block a user