Update server

This commit is contained in:
Sergiu Toma 2022-11-24 16:34:54 +02:00
parent f2c0794bf4
commit 2a7bd42247
2 changed files with 12 additions and 12 deletions

View File

@ -20688,6 +20688,7 @@ const connectSendTransport = async () => {
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce // https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce
// this action will trigger the 'connect' and 'produce' events above // this action will trigger the 'connect' and 'produce' events above
producerVideo = await producerTransport.produce(videoParams) producerVideo = await producerTransport.produce(videoParams)
console.log('producerVideo', producerVideo); console.log('producerVideo', producerVideo);
producerVideo.on('trackended', () => { producerVideo.on('trackended', () => {
@ -20700,7 +20701,6 @@ const connectSendTransport = async () => {
// close video track // close video track
}) })
producerAudio = await producerTransport.produce(audioParams) producerAudio = await producerTransport.produce(audioParams)
console.log('producerAudio', producerAudio); console.log('producerAudio', producerAudio);
producerAudio.on('trackended', () => { producerAudio.on('trackended', () => {

View File

@ -330,6 +330,7 @@ const connectSendTransport = async () => {
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce // https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce
// this action will trigger the 'connect' and 'produce' events above // this action will trigger the 'connect' and 'produce' events above
producerVideo = await producerTransport.produce(videoParams) producerVideo = await producerTransport.produce(videoParams)
console.log('producerVideo', producerVideo); console.log('producerVideo', producerVideo);
producerVideo.on('trackended', () => { producerVideo.on('trackended', () => {
@ -342,18 +343,17 @@ const connectSendTransport = async () => {
// close video track // close video track
}) })
producerAudio = await producerTransport.produce(audioParams)
console.log('producerAudio', producerAudio);
producerAudio.on('trackended', () => {
console.log('track ended')
// close video track
})
// producerAudio = await producerTransport.produce(audioParams) producerAudio.on('transportclose', () => {
// console.log('producerAudio', producerAudio); console.log('transport ended')
// producerAudio.on('trackended', () => { // close video track
// console.log('track ended') })
// // close video track
// })
// producerAudio.on('transportclose', () => {
// console.log('transport ended')
// // close video track
// })