@webex/web-client-media-engine 1.38.1 → 1.38.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +10 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +10 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -9598,6 +9598,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
9598
9598
|
streamSignalingMode: 'SSRC',
|
|
9599
9599
|
bundlePolicy: 'max-compat',
|
|
9600
9600
|
iceServers: undefined,
|
|
9601
|
+
disableContentSimulcast: true,
|
|
9601
9602
|
};
|
|
9602
9603
|
class MultistreamConnection extends EventEmitter {
|
|
9603
9604
|
constructor(userOptions = {}) {
|
|
@@ -9618,11 +9619,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
9618
9619
|
this.overuseStateManager.start();
|
|
9619
9620
|
this.statsManager = new StatsManager(() => this.pc.getStats(), (stats) => this.preProcessStats(stats));
|
|
9620
9621
|
const mainSceneId = generateSceneId();
|
|
9621
|
-
const videoMainEncodingOptions = this.getVideoEncodingOptions();
|
|
9622
|
+
const videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent.Main);
|
|
9622
9623
|
this.createSendTransceiver(MediaType.VideoMain, mainSceneId, videoMainEncodingOptions);
|
|
9623
9624
|
this.createSendTransceiver(MediaType.AudioMain, mainSceneId);
|
|
9624
9625
|
if (this.options.floorControlledPresentation) {
|
|
9625
|
-
const videoPresentationEncodingOptions = this.getVideoEncodingOptions();
|
|
9626
|
+
const videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent.Slides);
|
|
9626
9627
|
const contentSceneId = generateSceneId();
|
|
9627
9628
|
this.createSendTransceiver(MediaType.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
|
|
9628
9629
|
this.createSendTransceiver(MediaType.AudioSlides, contentSceneId);
|
|
@@ -9652,8 +9653,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
9652
9653
|
getConnectionState() {
|
|
9653
9654
|
return this.pc.getConnectionState();
|
|
9654
9655
|
}
|
|
9655
|
-
getVideoEncodingOptions() {
|
|
9656
|
-
|
|
9656
|
+
getVideoEncodingOptions(content) {
|
|
9657
|
+
const enabledSimulcast = content === MediaContent.Main
|
|
9658
|
+
? !this.options.disableSimulcast
|
|
9659
|
+
: !this.options.disableContentSimulcast;
|
|
9660
|
+
return enabledSimulcast
|
|
9657
9661
|
? [
|
|
9658
9662
|
{ scaleResolutionDownBy: 4, active: false },
|
|
9659
9663
|
{ scaleResolutionDownBy: 2, active: false },
|
|
@@ -10090,7 +10094,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
10090
10094
|
.filter((av) => av.direction === 'sendrecv')
|
|
10091
10095
|
.forEach((av) => {
|
|
10092
10096
|
const egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
|
|
10093
|
-
const simulcastEnabled = av.
|
|
10097
|
+
const simulcastEnabled = !!av.simulcast;
|
|
10094
10098
|
const rtxEnabled = av.type === 'video';
|
|
10095
10099
|
egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
|
|
10096
10100
|
if (av.type === 'video') {
|
|
@@ -10190,7 +10194,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
10190
10194
|
transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
10191
10195
|
direction: 'sendrecv',
|
|
10192
10196
|
sendEncodings: getMediaFamily(mediaType) === MediaFamily.Video
|
|
10193
|
-
? this.getVideoEncodingOptions()
|
|
10197
|
+
? this.getVideoEncodingOptions(getMediaContent(mediaType))
|
|
10194
10198
|
: undefined,
|
|
10195
10199
|
}));
|
|
10196
10200
|
transceiver.csi = generateCsi(getMediaFamily(mediaType), mainSceneId);
|