Update server
This commit is contained in:
parent
e59f134a68
commit
c6edb2947d
3
app.js
3
app.js
@ -332,6 +332,8 @@ peers.on('connection', async socket => {
|
|||||||
*/
|
*/
|
||||||
socket.on('consume', async ({ rtpCapabilities }, callback) => {
|
socket.on('consume', async ({ rtpCapabilities }, callback) => {
|
||||||
try {
|
try {
|
||||||
|
console.log(`[consume] rtpCapabilities: ${rtpCapabilities}`);
|
||||||
|
|
||||||
const callId = socketDetails[socket.id];
|
const callId = socketDetails[socket.id];
|
||||||
console.log('[consume] callId', callId);
|
console.log('[consume] callId', callId);
|
||||||
|
|
||||||
@ -370,6 +372,7 @@ peers.on('connection', async socket => {
|
|||||||
rtpParameters: videoCalls[callId].consumer.rtpParameters,
|
rtpParameters: videoCalls[callId].consumer.rtpParameters,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
console.log('[consume] params', params);
|
||||||
// Send the parameters to the client
|
// Send the parameters to the client
|
||||||
callback({ params });
|
callback({ params });
|
||||||
} else {
|
} else {
|
||||||
|
@ -20688,7 +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
|
||||||
|
|
||||||
|
console.log('videoParams', videoParams);
|
||||||
producerVideo = await producerTransport.produce(videoParams)
|
producerVideo = await producerTransport.produce(videoParams)
|
||||||
console.log('producerVideo', producerVideo);
|
console.log('producerVideo', producerVideo);
|
||||||
producerVideo.on('trackended', () => {
|
producerVideo.on('trackended', () => {
|
||||||
@ -20701,6 +20701,7 @@ const connectSendTransport = async () => {
|
|||||||
// close video track
|
// close video track
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('audioParams', audioParams);
|
||||||
producerAudio = await producerTransport.produce(audioParams)
|
producerAudio = await producerTransport.produce(audioParams)
|
||||||
console.log('producerAudio', producerAudio);
|
console.log('producerAudio', producerAudio);
|
||||||
producerAudio.on('trackended', () => {
|
producerAudio.on('trackended', () => {
|
||||||
@ -20710,7 +20711,7 @@ const connectSendTransport = async () => {
|
|||||||
|
|
||||||
producerAudio.on('transportclose', () => {
|
producerAudio.on('transportclose', () => {
|
||||||
console.log('transport ended')
|
console.log('transport ended')
|
||||||
|
|
||||||
// close video track
|
// close video track
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -330,7 +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
|
||||||
|
|
||||||
|
console.log('videoParams', videoParams);
|
||||||
producerVideo = await producerTransport.produce(videoParams)
|
producerVideo = await producerTransport.produce(videoParams)
|
||||||
console.log('producerVideo', producerVideo);
|
console.log('producerVideo', producerVideo);
|
||||||
producerVideo.on('trackended', () => {
|
producerVideo.on('trackended', () => {
|
||||||
@ -343,6 +343,7 @@ const connectSendTransport = async () => {
|
|||||||
// close video track
|
// close video track
|
||||||
})
|
})
|
||||||
|
|
||||||
|
console.log('audioParams', audioParams);
|
||||||
producerAudio = await producerTransport.produce(audioParams)
|
producerAudio = await producerTransport.produce(audioParams)
|
||||||
console.log('producerAudio', producerAudio);
|
console.log('producerAudio', producerAudio);
|
||||||
producerAudio.on('trackended', () => {
|
producerAudio.on('trackended', () => {
|
||||||
@ -352,7 +353,7 @@ const connectSendTransport = async () => {
|
|||||||
|
|
||||||
producerAudio.on('transportclose', () => {
|
producerAudio.on('transportclose', () => {
|
||||||
console.log('transport ended')
|
console.log('transport ended')
|
||||||
|
|
||||||
// close video track
|
// close video track
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user