Expose simulcast settings to client config
parent
9670e45e7a
commit
d64247d12d
|
|
@ -22,7 +22,19 @@ var config =
|
||||||
* veryhigh ~ 1920x1080
|
* veryhigh ~ 1920x1080
|
||||||
* ultra ~ 3840x2560
|
* ultra ~ 3840x2560
|
||||||
**/
|
**/
|
||||||
defaultResolution : 'medium',
|
defaultResolution : 'medium',
|
||||||
|
// Enable or disable simulcast for webcam video
|
||||||
|
simulcast : true,
|
||||||
|
// Enable or disable simulcast for screen sharing video
|
||||||
|
simulcastSharing : false,
|
||||||
|
// Simulcast encoding layers and levels
|
||||||
|
simulcastEncodings :
|
||||||
|
[
|
||||||
|
{ scaleResolutionDownBy: 4 },
|
||||||
|
{ scaleResolutionDownBy: 2 },
|
||||||
|
{ scaleResolutionDownBy: 1 }
|
||||||
|
],
|
||||||
|
// Socket.io request timeout
|
||||||
requestTimeout : 10000,
|
requestTimeout : 10000,
|
||||||
transportOptions :
|
transportOptions :
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -157,9 +157,15 @@ export default class RoomClient
|
||||||
// Whether simulcast should be used.
|
// Whether simulcast should be used.
|
||||||
this._useSimulcast = useSimulcast;
|
this._useSimulcast = useSimulcast;
|
||||||
|
|
||||||
|
if ('simulcast' in window.config)
|
||||||
|
this._useSimulcast = window.config.simulcast;
|
||||||
|
|
||||||
// Whether simulcast should be used for sharing
|
// Whether simulcast should be used for sharing
|
||||||
this._useSharingSimulcast = useSharingSimulcast;
|
this._useSharingSimulcast = useSharingSimulcast;
|
||||||
|
|
||||||
|
if ('simulcastSharing' in window.config)
|
||||||
|
this._useSharingSimulcast = window.config.simulcastSharing;
|
||||||
|
|
||||||
this._muted = muted;
|
this._muted = muted;
|
||||||
|
|
||||||
// This device
|
// This device
|
||||||
|
|
@ -2574,8 +2580,16 @@ export default class RoomClient
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
encodings = VIDEO_SIMULCAST_ENCODINGS
|
if ('simulcastEncodings' in window.config)
|
||||||
.map((encoding) => ({ ...encoding, dtx: true }));
|
{
|
||||||
|
encodings = window.config.simulcastEncodings
|
||||||
|
.map((encoding) => ({ ...encoding, dtx: true }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
encodings = VIDEO_SIMULCAST_ENCODINGS
|
||||||
|
.map((encoding) => ({ ...encoding, dtx: true }));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._screenSharingProducer = await this._sendTransport.produce(
|
this._screenSharingProducer = await this._sendTransport.produce(
|
||||||
|
|
@ -2743,7 +2757,12 @@ export default class RoomClient
|
||||||
if (firstVideoCodec.mimeType.toLowerCase() === 'video/vp9')
|
if (firstVideoCodec.mimeType.toLowerCase() === 'video/vp9')
|
||||||
encodings = VIDEO_KSVC_ENCODINGS;
|
encodings = VIDEO_KSVC_ENCODINGS;
|
||||||
else
|
else
|
||||||
encodings = VIDEO_SIMULCAST_ENCODINGS;
|
{
|
||||||
|
if ('simulcastEncodings' in window.config)
|
||||||
|
encodings = window.config.simulcastEncodings;
|
||||||
|
else
|
||||||
|
encodings = VIDEO_SIMULCAST_ENCODINGS;
|
||||||
|
}
|
||||||
|
|
||||||
this._webcamProducer = await this._sendTransport.produce(
|
this._webcamProducer = await this._sendTransport.produce(
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue