Compare commits

...

2 Commits

Author SHA1 Message Date
950298c4f6 Update server 2022-11-24 16:21:22 +02:00
6e74083733 Update server 2022-11-24 13:49:04 +02:00
3 changed files with 17 additions and 1 deletions

4
app.js
View File

@ -285,7 +285,9 @@ peers.on('connection', async socket => {
const callId = socketDetails[socket.id]; const callId = socketDetails[socket.id];
if (typeof rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters); if (typeof rtpParameters === 'string') rtpParameters = JSON.parse(rtpParameters);
console.log('[transport-produce] | socket.id', socket.id, '| callId', callId); console.log(`[transport-produce] kind: ${kind} | socket.id: ${socket.id} | callId: ${callId}`);
console.log('kind', kind);
console.log('rtpParameters', rtpParameters);
videoCalls[callId].producer = await videoCalls[callId].producerTransport.produce({ videoCalls[callId].producer = await videoCalls[callId].producerTransport.produce({
kind, kind,
rtpParameters, rtpParameters,

View File

@ -20687,6 +20687,7 @@ const connectSendTransport = async () => {
// to send media to the Router // to send media to the Router
// 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', () => {
@ -20699,6 +20700,7 @@ 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', () => {
@ -20711,6 +20713,11 @@ const connectSendTransport = async () => {
// close video track // close video track
}) })
const answer = { const answer = {
origin_asset_id: ASSET_ID, origin_asset_id: ASSET_ID,
dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')), dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')),

View File

@ -329,6 +329,7 @@ const connectSendTransport = async () => {
// to send media to the Router // to send media to the Router
// 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', () => {
@ -341,6 +342,7 @@ 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', () => {
@ -353,6 +355,11 @@ const connectSendTransport = async () => {
// close video track // close video track
}) })
const answer = { const answer = {
origin_asset_id: ASSET_ID, origin_asset_id: ASSET_ID,
dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')), dest_asset_id: originAssetId || parseInt(urlParams.get('dest_asset_id')),