Update server
This commit is contained in:
parent
3c23c6791d
commit
a97ec24148
@ -20446,7 +20446,7 @@ setTimeout(() => {
|
||||
connectToMediasoup()
|
||||
}
|
||||
|
||||
}, 2000);
|
||||
}, 1600);
|
||||
|
||||
|
||||
let device
|
||||
@ -20457,28 +20457,18 @@ let producerVideo
|
||||
let producerAudio
|
||||
let consumer
|
||||
let originAssetId
|
||||
// let originAssetName = 'Adi'
|
||||
// let originAssetTypeName = 'linx'
|
||||
|
||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerOptions
|
||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce
|
||||
let videoParams = {
|
||||
// mediasoup params
|
||||
codec : device.rtpCapabilities.codecs
|
||||
.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'),
|
||||
encodings: [
|
||||
{
|
||||
maxBitrate: 100000,
|
||||
scalabilityMode: 'S1T3',
|
||||
},
|
||||
{
|
||||
maxBitrate: 300000,
|
||||
scalabilityMode: 'S1T3',
|
||||
},
|
||||
{
|
||||
maxBitrate: 900000,
|
||||
scalabilityMode: 'S1T3',
|
||||
},
|
||||
{ scaleResolutionDownBy: 4, maxBitrate: 500000 },
|
||||
{ scaleResolutionDownBy: 2, maxBitrate: 1000000 },
|
||||
{ scaleResolutionDownBy: 1, maxBitrate: 5000000 },
|
||||
{ scalabilityMode: 'S3T3_KEY' }
|
||||
],
|
||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerCodecOptions
|
||||
codecOptions: {
|
||||
videoGoogleStartBitrate: 1000
|
||||
}
|
||||
@ -20517,14 +20507,9 @@ const getLocalStream = () => {
|
||||
navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
video: {
|
||||
width: {
|
||||
min: 640,
|
||||
max: 1920,
|
||||
},
|
||||
height: {
|
||||
min: 400,
|
||||
max: 1080,
|
||||
}
|
||||
qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
}
|
||||
})
|
||||
.then(streamSuccess)
|
||||
|
@ -88,7 +88,7 @@ setTimeout(() => {
|
||||
connectToMediasoup()
|
||||
}
|
||||
|
||||
}, 2000);
|
||||
}, 1600);
|
||||
|
||||
|
||||
let device
|
||||
@ -99,28 +99,18 @@ let producerVideo
|
||||
let producerAudio
|
||||
let consumer
|
||||
let originAssetId
|
||||
// let originAssetName = 'Adi'
|
||||
// let originAssetTypeName = 'linx'
|
||||
|
||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerOptions
|
||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#transport-produce
|
||||
let videoParams = {
|
||||
// mediasoup params
|
||||
codec : device.rtpCapabilities.codecs
|
||||
.find((codec) => codec.mimeType.toLowerCase() === 'video/vp9'),
|
||||
encodings: [
|
||||
{
|
||||
maxBitrate: 100000,
|
||||
scalabilityMode: 'S1T3',
|
||||
},
|
||||
{
|
||||
maxBitrate: 300000,
|
||||
scalabilityMode: 'S1T3',
|
||||
},
|
||||
{
|
||||
maxBitrate: 900000,
|
||||
scalabilityMode: 'S1T3',
|
||||
},
|
||||
{ scaleResolutionDownBy: 4, maxBitrate: 500000 },
|
||||
{ scaleResolutionDownBy: 2, maxBitrate: 1000000 },
|
||||
{ scaleResolutionDownBy: 1, maxBitrate: 5000000 },
|
||||
{ scalabilityMode: 'S3T3_KEY' }
|
||||
],
|
||||
// https://mediasoup.org/documentation/v3/mediasoup-client/api/#ProducerCodecOptions
|
||||
codecOptions: {
|
||||
videoGoogleStartBitrate: 1000
|
||||
}
|
||||
@ -159,14 +149,9 @@ const getLocalStream = () => {
|
||||
navigator.mediaDevices.getUserMedia({
|
||||
audio: true,
|
||||
video: {
|
||||
width: {
|
||||
min: 640,
|
||||
max: 1920,
|
||||
},
|
||||
height: {
|
||||
min: 400,
|
||||
max: 1080,
|
||||
}
|
||||
qvga : { width: { ideal: 320 }, height: { ideal: 240 } },
|
||||
vga : { width: { ideal: 640 }, height: { ideal: 480 } },
|
||||
hd : { width: { ideal: 1280 }, height: { ideal: 720 } }
|
||||
}
|
||||
})
|
||||
.then(streamSuccess)
|
||||
|
Loading…
Reference in New Issue
Block a user