Update build

This commit is contained in:
Sergiu Toma 2022-11-22 18:32:47 +02:00
parent cdbfc7891d
commit bc2bf24a65

View File

@ -15,7 +15,10 @@ console.log('[URL] ASSET_ID', ASSET_ID, '| ACCOUNT_ID', ACCOUNT_ID, '| callId',
console.log('🟩 config', config)
let socket
hub = io(config.hubAddress)
setTimeout(() => {
hub = io(config.hubAddress)
}, 2000);
const connectToMediasoup = () => {
@ -37,7 +40,6 @@ const connectToMediasoup = () => {
}
if (IS_PRODUCER === true) {
setTimeout(() => {
hub.on('connect', async () => {
console.log(`[HUB]! ${config.hubAddress} | connected: ${hub.connected}`)
connectToMediasoup()
@ -71,7 +73,6 @@ if (IS_PRODUCER === true) {
}
})
})
}, 2000);
hub.on('connect_error', (error) => {
console.log('connect_error', error);