@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/esm/index.js
CHANGED
|
@@ -9594,6 +9594,7 @@ const defaultMultistreamConnectionOptions = {
|
|
|
9594
9594
|
streamSignalingMode: 'SSRC',
|
|
9595
9595
|
bundlePolicy: 'max-compat',
|
|
9596
9596
|
iceServers: undefined,
|
|
9597
|
+
disableContentSimulcast: true,
|
|
9597
9598
|
};
|
|
9598
9599
|
class MultistreamConnection extends EventEmitter {
|
|
9599
9600
|
constructor(userOptions = {}) {
|
|
@@ -9614,11 +9615,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
9614
9615
|
this.overuseStateManager.start();
|
|
9615
9616
|
this.statsManager = new StatsManager(() => this.pc.getStats(), (stats) => this.preProcessStats(stats));
|
|
9616
9617
|
const mainSceneId = generateSceneId();
|
|
9617
|
-
const videoMainEncodingOptions = this.getVideoEncodingOptions();
|
|
9618
|
+
const videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent.Main);
|
|
9618
9619
|
this.createSendTransceiver(MediaType.VideoMain, mainSceneId, videoMainEncodingOptions);
|
|
9619
9620
|
this.createSendTransceiver(MediaType.AudioMain, mainSceneId);
|
|
9620
9621
|
if (this.options.floorControlledPresentation) {
|
|
9621
|
-
const videoPresentationEncodingOptions = this.getVideoEncodingOptions();
|
|
9622
|
+
const videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent.Slides);
|
|
9622
9623
|
const contentSceneId = generateSceneId();
|
|
9623
9624
|
this.createSendTransceiver(MediaType.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
|
|
9624
9625
|
this.createSendTransceiver(MediaType.AudioSlides, contentSceneId);
|
|
@@ -9648,8 +9649,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
9648
9649
|
getConnectionState() {
|
|
9649
9650
|
return this.pc.getConnectionState();
|
|
9650
9651
|
}
|
|
9651
|
-
getVideoEncodingOptions() {
|
|
9652
|
-
|
|
9652
|
+
getVideoEncodingOptions(content) {
|
|
9653
|
+
const enabledSimulcast = content === MediaContent.Main
|
|
9654
|
+
? !this.options.disableSimulcast
|
|
9655
|
+
: !this.options.disableContentSimulcast;
|
|
9656
|
+
return enabledSimulcast
|
|
9653
9657
|
? [
|
|
9654
9658
|
{ scaleResolutionDownBy: 4, active: false },
|
|
9655
9659
|
{ scaleResolutionDownBy: 2, active: false },
|
|
@@ -10086,7 +10090,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
10086
10090
|
.filter((av) => av.direction === 'sendrecv')
|
|
10087
10091
|
.forEach((av) => {
|
|
10088
10092
|
const egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
|
|
10089
|
-
const simulcastEnabled = av.
|
|
10093
|
+
const simulcastEnabled = !!av.simulcast;
|
|
10090
10094
|
const rtxEnabled = av.type === 'video';
|
|
10091
10095
|
egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
|
|
10092
10096
|
if (av.type === 'video') {
|
|
@@ -10186,7 +10190,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
10186
10190
|
transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
10187
10191
|
direction: 'sendrecv',
|
|
10188
10192
|
sendEncodings: getMediaFamily(mediaType) === MediaFamily.Video
|
|
10189
|
-
? this.getVideoEncodingOptions()
|
|
10193
|
+
? this.getVideoEncodingOptions(getMediaContent(mediaType))
|
|
10190
10194
|
: undefined,
|
|
10191
10195
|
}));
|
|
10192
10196
|
transceiver.csi = generateCsi(getMediaFamily(mediaType), mainSceneId);
|