Update build

This commit is contained in:
Sergiu Toma 2022-11-22 18:35:36 +02:00
parent 1a1fa9450e
commit d593d6dc83
2 changed files with 140 additions and 136 deletions

View File

@ -20376,9 +20376,8 @@ let socket, hub
setTimeout(() => {
hub = io(config.hubAddress)
}, 2000);
const connectToMediasoup = () => {
const connectToMediasoup = () => {
socket = io(config.mediasoupAddress, {
reconnection: true,
@ -20395,9 +20394,9 @@ const connectToMediasoup = () => {
}
if (IS_PRODUCER && urlParams.get('testing') === 'true') { getLocalStream() }
})
}
}
if (IS_PRODUCER === true) {
if (IS_PRODUCER === true) {
hub.on('connect', async () => {
console.log(`[HUB]! ${config.hubAddress} | connected: ${hub.connected}`)
connectToMediasoup()
@ -20443,9 +20442,12 @@ if (IS_PRODUCER === true) {
hub.on('disconnect', () => {
console.log('disconnect')
})
} else {
} else {
connectToMediasoup()
}
}
}, 2000);
let device
let rtpCapabilities

View File

@ -18,9 +18,8 @@ let socket, hub
setTimeout(() => {
hub = io(config.hubAddress)
}, 2000);
const connectToMediasoup = () => {
const connectToMediasoup = () => {
socket = io(config.mediasoupAddress, {
reconnection: true,
@ -37,9 +36,9 @@ const connectToMediasoup = () => {
}
if (IS_PRODUCER && urlParams.get('testing') === 'true') { getLocalStream() }
})
}
}
if (IS_PRODUCER === true) {
if (IS_PRODUCER === true) {
hub.on('connect', async () => {
console.log(`[HUB]! ${config.hubAddress} | connected: ${hub.connected}`)
connectToMediasoup()
@ -85,9 +84,12 @@ if (IS_PRODUCER === true) {
hub.on('disconnect', () => {
console.log('disconnect')
})
} else {
} else {
connectToMediasoup()
}
}
}, 2000);
let device
let rtpCapabilities