Remove callback with producer id from transport-produce
This commit is contained in:
parent
aaa1c5cea4
commit
4e92f6cdd3
8
app.js
8
app.js
@ -149,13 +149,12 @@ peers.on('connection', async socket => {
|
||||
})
|
||||
|
||||
// see client's socket.emit('transport-produce', ...)
|
||||
socket.on('transport-produce', async ({ kind, rtpParameters, appData }, callback) => {
|
||||
socket.on('transport-produce', async ({ kind, rtpParameters, appData }) => {
|
||||
// call produce based on the prameters from the client
|
||||
producer = await producerTransport.produce({
|
||||
kind,
|
||||
rtpParameters,
|
||||
})
|
||||
console.log('callback', callback);
|
||||
console.log(`[transport-produce] Producer ID: ${producer.id} | kind: ${producer.kind}`)
|
||||
|
||||
producer.on('transportclose', () => {
|
||||
@ -168,11 +167,6 @@ peers.on('connection', async socket => {
|
||||
router[callId].close()
|
||||
delete router[callId]
|
||||
})
|
||||
|
||||
// Send back to the client the Producer's id
|
||||
callback({
|
||||
id: producer.id
|
||||
})
|
||||
})
|
||||
|
||||
// see client's socket.emit('transport-recv-connect', ...)
|
||||
|
Loading…
Reference in New Issue
Block a user