Update server

This commit is contained in:
Sergiu Toma 2022-11-23 00:25:16 +02:00
parent 22656722e8
commit daa2c556e4

63
app.js
View File

@ -92,29 +92,54 @@ worker = createWorker();
// https://github.com/versatica/mediasoup/blob/v3/src/supportedRtpCapabilities.ts // https://github.com/versatica/mediasoup/blob/v3/src/supportedRtpCapabilities.ts
const mediaCodecs = [ const mediaCodecs = [
{ {
kind: 'audio', kind : 'audio',
// mimeType: 'audio/opus', mimeType : 'audio/opus',
// clockRate: 48000, clockRate : 48000,
// channels: 2, channels : 2
clockRate: 48000,
mimeType: "audio/opus", // https://developer.mozilla.org/en-US/docs/Web/Media/Formats/WebRTC_codecs#supported_audio_codecs
parameters: {
minptime: 10,
useinbandfec: 1
},
rtcpFeedback: [{
parameter: "",
type: "transport-cc"
}]
}, },
{ {
kind: 'video', kind : 'video',
mimeType: 'video/VP8', // https://developer.mozilla.org/en-US/docs/Web/Media/Formats/WebRTC_codecs#supported_video_codecs mimeType : 'video/VP8',
clockRate: 90000, clockRate : 90000,
parameters: { parameters :
'x-google-start-bitrate': 1000, {
'x-google-start-bitrate' : 1000
}
}, },
{
kind : 'video',
mimeType : 'video/VP9',
clockRate : 90000,
parameters :
{
'profile-id' : 2,
'x-google-start-bitrate' : 1000
}
}, },
{
kind : 'video',
mimeType : 'video/h264',
clockRate : 90000,
parameters :
{
'packetization-mode' : 1,
'profile-level-id' : '4d0032',
'level-asymmetry-allowed' : 1,
'x-google-start-bitrate' : 1000
}
},
{
kind : 'video',
mimeType : 'video/h264',
clockRate : 90000,
parameters :
{
'packetization-mode' : 1,
'profile-level-id' : '42e01f',
'level-asymmetry-allowed' : 1,
'x-google-start-bitrate' : 1000
}
}
]; ];
const closeCall = (callId) => { const closeCall = (callId) => {