@webex/web-client-media-engine 1.38.1 → 1.38.3
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 +16 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +11 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -4765,11 +4765,11 @@ function createRTCPeerConnection(configuration) {
|
|
|
4765
4765
|
/**
|
|
4766
4766
|
* A type-safe form of the DOMString used in the MediaStreamTrack.kind field.
|
|
4767
4767
|
*/
|
|
4768
|
-
|
|
4768
|
+
exports.MediaStreamTrackKind = void 0;
|
|
4769
4769
|
(function (MediaStreamTrackKind) {
|
|
4770
4770
|
MediaStreamTrackKind["Audio"] = "audio";
|
|
4771
4771
|
MediaStreamTrackKind["Video"] = "video";
|
|
4772
|
-
})(MediaStreamTrackKind || (MediaStreamTrackKind = {}));
|
|
4772
|
+
})(exports.MediaStreamTrackKind || (exports.MediaStreamTrackKind = {}));
|
|
4773
4773
|
var PeerConnectionEvents;
|
|
4774
4774
|
(function (PeerConnectionEvents) {
|
|
4775
4775
|
PeerConnectionEvents["IceGatheringStateChange"] = "icegatheringstatechange";
|
|
@@ -9576,11 +9576,11 @@ function setLogHandler(logHandler) {
|
|
|
9576
9576
|
|
|
9577
9577
|
function toMediaStreamTrackKind(mediaType) {
|
|
9578
9578
|
return [MediaType.VideoMain, MediaType.VideoSlides].includes(mediaType)
|
|
9579
|
-
? MediaStreamTrackKind.Video
|
|
9580
|
-
: MediaStreamTrackKind.Audio;
|
|
9579
|
+
? exports.MediaStreamTrackKind.Video
|
|
9580
|
+
: exports.MediaStreamTrackKind.Audio;
|
|
9581
9581
|
}
|
|
9582
9582
|
function toMediaFamily(kind) {
|
|
9583
|
-
if (kind === MediaStreamTrackKind.Video) {
|
|
9583
|
+
if (kind === exports.MediaStreamTrackKind.Video) {
|
|
9584
9584
|
return MediaFamily.Video;
|
|
9585
9585
|
}
|
|
9586
9586
|
return MediaFamily.Audio;
|
|
@@ -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);
|
|
@@ -10293,6 +10297,7 @@ exports.LocalTrack = LocalTrack;
|
|
|
10293
10297
|
exports.Logger = Logger;
|
|
10294
10298
|
exports.MediaRequest = MediaRequest;
|
|
10295
10299
|
exports.MultistreamConnection = MultistreamConnection;
|
|
10300
|
+
exports.PeerConnection = PeerConnection;
|
|
10296
10301
|
exports.ReceiveSlot = ReceiveSlot;
|
|
10297
10302
|
exports.SendOnlyTransceiver = SendOnlyTransceiver;
|
|
10298
10303
|
exports.WcmeError = WcmeError;
|