Compare commits
No commits in common. "d67debc70be682c47232ae15966663793e553a44" and "004c0f66a7a3e34d05b5da4567d77a5002f2d8e5" have entirely different histories.
d67debc70b
...
004c0f66a7
21
app.js
21
app.js
@ -109,7 +109,6 @@ peers.on('connection', async socket => {
|
||||
})
|
||||
|
||||
socket.on('createRoom', async ({ callId }, callback) => {
|
||||
console.log('[createRoom] callId', callId);
|
||||
console.log('Router length:', Object.keys(router).length);
|
||||
if (router[callId] === undefined) {
|
||||
// worker.createRouter(options)
|
||||
@ -253,8 +252,8 @@ const createWebRtcTransportLayer = async (callId, callback) => {
|
||||
preferUdp: true,
|
||||
}
|
||||
|
||||
// console.log('webRtcTransport_options', webRtcTransport_options);
|
||||
// console.log('router', router, '| router[callId]', router[callId]);
|
||||
console.log('webRtcTransport_options', webRtcTransport_options);
|
||||
console.log('router', router, '| router[callId]', router[callId]);
|
||||
|
||||
// https://mediasoup.org/documentation/v3/mediasoup/api/#router-createWebRtcTransport
|
||||
let transport = await router[callId].createWebRtcTransport(webRtcTransport_options)
|
||||
@ -270,19 +269,15 @@ const createWebRtcTransportLayer = async (callId, callback) => {
|
||||
console.log('transport closed')
|
||||
})
|
||||
|
||||
const params = {
|
||||
id: transport.id,
|
||||
iceParameters: transport.iceParameters,
|
||||
iceCandidates: transport.iceCandidates,
|
||||
dtlsParameters: transport.dtlsParameters,
|
||||
}
|
||||
|
||||
console.log('params', params);
|
||||
|
||||
// send back to the client the following prameters
|
||||
callback({
|
||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#TransportOptions
|
||||
params
|
||||
params: {
|
||||
id: transport.id,
|
||||
iceParameters: transport.iceParameters,
|
||||
iceCandidates: transport.iceCandidates,
|
||||
dtlsParameters: transport.dtlsParameters,
|
||||
}
|
||||
})
|
||||
|
||||
return transport
|
||||
|
Loading…
x
Reference in New Issue
Block a user