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

Closed
sergiu wants to merge 120 commits from LH-265-enable-audio-in-mediasoup into master
3 changed files with 9 additions and 4 deletions
Showing only changes of commit c6edb2947d - Show all commits

3
app.js
View File

@ -332,6 +332,8 @@ peers.on('connection', async socket => {
*/
socket.on('consume', async ({ rtpCapabilities }, callback) => {
try {
console.log(`[consume] rtpCapabilities: ${rtpCapabilities}`);
const callId = socketDetails[socket.id];
console.log('[consume] callId', callId);
@ -370,6 +372,7 @@ peers.on('connection', async socket => {
rtpParameters: videoCalls[callId].consumer.rtpParameters,
};
console.log('[consume] params', params);
// Send the parameters to the client
callback({ params });
} else {

View File

@ -20688,7 +20688,7 @@ 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', () => {
@ -20701,6 +20701,7 @@ const connectSendTransport = async () => {
// close video track
})
console.log('audioParams', audioParams);
producerAudio = await producerTransport.produce(audioParams)
console.log('producerAudio', producerAudio);
producerAudio.on('trackended', () => {
@ -20710,7 +20711,7 @@ const connectSendTransport = async () => {
producerAudio.on('transportclose', () => {
console.log('transport ended')
// close video track
})

View File

@ -330,7 +330,7 @@ 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', () => {
@ -343,6 +343,7 @@ const connectSendTransport = async () => {
// close video track
})
console.log('audioParams', audioParams);
producerAudio = await producerTransport.produce(audioParams)
console.log('producerAudio', producerAudio);
producerAudio.on('trackended', () => {
@ -352,7 +353,7 @@ const connectSendTransport = async () => {
producerAudio.on('transportclose', () => {
console.log('transport ended')
// close video track
})