LH-265-enable-audio-in-mediasoup #16

Closed
sergiu wants to merge 120 commits from LH-265-enable-audio-in-mediasoup into master
2 changed files with 26 additions and 24 deletions
Showing only changes of commit 1148532a9b - Show all commits

View File

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

View File

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