Update server
This commit is contained in:
parent
c6edb2947d
commit
22ead926b0
4
app.js
4
app.js
@ -91,6 +91,7 @@ worker = createWorker();
|
|||||||
// list of media codecs supported by mediasoup ...
|
// list of media codecs supported by mediasoup ...
|
||||||
// https://github.com/versatica/mediasoup/blob/v3/src/supportedRtpCapabilities.ts
|
// https://github.com/versatica/mediasoup/blob/v3/src/supportedRtpCapabilities.ts
|
||||||
const mediaCodecs = [
|
const mediaCodecs = [
|
||||||
|
channels : 2,
|
||||||
{
|
{
|
||||||
kind : 'audio',
|
kind : 'audio',
|
||||||
mimeType : 'audio/opus',
|
mimeType : 'audio/opus',
|
||||||
@ -104,7 +105,8 @@ const mediaCodecs = [
|
|||||||
parameters :
|
parameters :
|
||||||
{
|
{
|
||||||
'x-google-start-bitrate' : 1000
|
'x-google-start-bitrate' : 1000
|
||||||
}
|
},
|
||||||
|
channels : 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
kind : 'video',
|
kind : 'video',
|
||||||
|
@ -20688,18 +20688,6 @@ 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)
|
|
||||||
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);
|
console.log('audioParams', audioParams);
|
||||||
producerAudio = await producerTransport.produce(audioParams)
|
producerAudio = await producerTransport.produce(audioParams)
|
||||||
@ -20716,6 +20704,18 @@ 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
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,18 +330,6 @@ 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)
|
|
||||||
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);
|
console.log('audioParams', audioParams);
|
||||||
producerAudio = await producerTransport.produce(audioParams)
|
producerAudio = await producerTransport.produce(audioParams)
|
||||||
@ -358,6 +346,18 @@ 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
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user