@webex/internal-media-core 1.35.1 → 1.35.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 +23 -11
- package/dist/esm/index.js +23 -11
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -14141,7 +14141,8 @@ var defaultMultistreamConnectionOptions = {
|
|
|
14141
14141
|
disableSimulcast: getBrowserDetails().name === 'Firefox',
|
|
14142
14142
|
streamSignalingMode: 'SSRC',
|
|
14143
14143
|
bundlePolicy: 'max-compat',
|
|
14144
|
-
iceServers: undefined
|
|
14144
|
+
iceServers: undefined,
|
|
14145
|
+
disableContentSimulcast: true
|
|
14145
14146
|
};
|
|
14146
14147
|
class MultistreamConnection extends EventEmitter {
|
|
14147
14148
|
constructor() {
|
|
@@ -14163,11 +14164,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14163
14164
|
this.overuseStateManager.start();
|
|
14164
14165
|
this.statsManager = new StatsManager(() => this.pc.getStats(), stats => this.preProcessStats(stats));
|
|
14165
14166
|
var mainSceneId = generateSceneId();
|
|
14166
|
-
var videoMainEncodingOptions = this.getVideoEncodingOptions();
|
|
14167
|
+
var videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Main);
|
|
14167
14168
|
this.createSendTransceiver(MediaType.VideoMain, mainSceneId, videoMainEncodingOptions);
|
|
14168
14169
|
this.createSendTransceiver(MediaType.AudioMain, mainSceneId);
|
|
14169
14170
|
if (this.options.floorControlledPresentation) {
|
|
14170
|
-
var videoPresentationEncodingOptions = this.getVideoEncodingOptions();
|
|
14171
|
+
var videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Slides);
|
|
14171
14172
|
var contentSceneId = generateSceneId();
|
|
14172
14173
|
this.createSendTransceiver(MediaType.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
|
|
14173
14174
|
this.createSendTransceiver(MediaType.AudioSlides, contentSceneId);
|
|
@@ -14197,8 +14198,9 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14197
14198
|
getConnectionState() {
|
|
14198
14199
|
return this.pc.getConnectionState();
|
|
14199
14200
|
}
|
|
14200
|
-
getVideoEncodingOptions() {
|
|
14201
|
-
|
|
14201
|
+
getVideoEncodingOptions(content) {
|
|
14202
|
+
var enabledSimulcast = content === MediaContent$1.Main ? !this.options.disableSimulcast : !this.options.disableContentSimulcast;
|
|
14203
|
+
return enabledSimulcast ? [{
|
|
14202
14204
|
scaleResolutionDownBy: 4,
|
|
14203
14205
|
active: false
|
|
14204
14206
|
}, {
|
|
@@ -14630,7 +14632,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14630
14632
|
});
|
|
14631
14633
|
parsed.avMedia.filter(av => av.direction === 'sendrecv').forEach(av => {
|
|
14632
14634
|
var egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
|
|
14633
|
-
var simulcastEnabled = av.
|
|
14635
|
+
var simulcastEnabled = !!av.simulcast;
|
|
14634
14636
|
var rtxEnabled = av.type === 'video';
|
|
14635
14637
|
egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
|
|
14636
14638
|
if (av.type === 'video') {
|
|
@@ -14691,15 +14693,25 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14691
14693
|
requestMedia(mediaType, mediaRequests) {
|
|
14692
14694
|
var _a;
|
|
14693
14695
|
var task = () => {
|
|
14696
|
+
var _a;
|
|
14694
14697
|
var jmpSession = this.jmpSessions.get(mediaType);
|
|
14695
14698
|
if (!jmpSession) {
|
|
14696
14699
|
logger$4.error("Unable to find jmp session for ".concat(mediaType));
|
|
14697
14700
|
return;
|
|
14698
14701
|
}
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14702
|
+
var requestedReceiveSlotIds = [];
|
|
14703
|
+
mediaRequests.forEach(mr => mr.receiveSlots.forEach(rs => {
|
|
14704
|
+
if (!rs.id) {
|
|
14705
|
+
logger$4.error("Running subscribe task, but ReceiveSlot ID is missing!");
|
|
14706
|
+
return;
|
|
14707
|
+
}
|
|
14708
|
+
requestedReceiveSlotIds.push(rs.id);
|
|
14709
|
+
}));
|
|
14710
|
+
(_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach(transceiver => {
|
|
14711
|
+
if (!requestedReceiveSlotIds.some(id => compareStreamIds(id, transceiver.receiveSlot.id))) {
|
|
14712
|
+
transceiver.receiveSlot._updateSource('no source', undefined);
|
|
14713
|
+
}
|
|
14714
|
+
});
|
|
14703
14715
|
jmpSession.sendRequests(mediaRequests.map(mr => mr._toJmpScrRequest()));
|
|
14704
14716
|
};
|
|
14705
14717
|
if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
|
|
@@ -14722,7 +14734,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14722
14734
|
this.addMid(mediaType);
|
|
14723
14735
|
transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
14724
14736
|
direction: 'sendrecv',
|
|
14725
|
-
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily.Video ? this.getVideoEncodingOptions() : undefined
|
|
14737
|
+
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily.Video ? this.getVideoEncodingOptions(getMediaContent(mediaType)) : undefined
|
|
14726
14738
|
}));
|
|
14727
14739
|
transceiver.csi = generateCsi(getMediaFamily$1(mediaType), mainSceneId);
|
|
14728
14740
|
(_a = this.jmpSessions.get(mediaType)) === null || _a === void 0 ? void 0 : _a.close();
|
package/dist/esm/index.js
CHANGED
|
@@ -14130,7 +14130,8 @@ var defaultMultistreamConnectionOptions = {
|
|
|
14130
14130
|
disableSimulcast: getBrowserDetails().name === 'Firefox',
|
|
14131
14131
|
streamSignalingMode: 'SSRC',
|
|
14132
14132
|
bundlePolicy: 'max-compat',
|
|
14133
|
-
iceServers: undefined
|
|
14133
|
+
iceServers: undefined,
|
|
14134
|
+
disableContentSimulcast: true
|
|
14134
14135
|
};
|
|
14135
14136
|
class MultistreamConnection extends EventEmitter {
|
|
14136
14137
|
constructor() {
|
|
@@ -14152,11 +14153,11 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14152
14153
|
this.overuseStateManager.start();
|
|
14153
14154
|
this.statsManager = new StatsManager(() => this.pc.getStats(), stats => this.preProcessStats(stats));
|
|
14154
14155
|
var mainSceneId = generateSceneId();
|
|
14155
|
-
var videoMainEncodingOptions = this.getVideoEncodingOptions();
|
|
14156
|
+
var videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Main);
|
|
14156
14157
|
this.createSendTransceiver(MediaType$1.VideoMain, mainSceneId, videoMainEncodingOptions);
|
|
14157
14158
|
this.createSendTransceiver(MediaType$1.AudioMain, mainSceneId);
|
|
14158
14159
|
if (this.options.floorControlledPresentation) {
|
|
14159
|
-
var videoPresentationEncodingOptions = this.getVideoEncodingOptions();
|
|
14160
|
+
var videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent$1.Slides);
|
|
14160
14161
|
var contentSceneId = generateSceneId();
|
|
14161
14162
|
this.createSendTransceiver(MediaType$1.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
|
|
14162
14163
|
this.createSendTransceiver(MediaType$1.AudioSlides, contentSceneId);
|
|
@@ -14186,8 +14187,9 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14186
14187
|
getConnectionState() {
|
|
14187
14188
|
return this.pc.getConnectionState();
|
|
14188
14189
|
}
|
|
14189
|
-
getVideoEncodingOptions() {
|
|
14190
|
-
|
|
14190
|
+
getVideoEncodingOptions(content) {
|
|
14191
|
+
var enabledSimulcast = content === MediaContent$1.Main ? !this.options.disableSimulcast : !this.options.disableContentSimulcast;
|
|
14192
|
+
return enabledSimulcast ? [{
|
|
14191
14193
|
scaleResolutionDownBy: 4,
|
|
14192
14194
|
active: false
|
|
14193
14195
|
}, {
|
|
@@ -14619,7 +14621,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14619
14621
|
});
|
|
14620
14622
|
parsed.avMedia.filter(av => av.direction === 'sendrecv').forEach(av => {
|
|
14621
14623
|
var egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
|
|
14622
|
-
var simulcastEnabled = av.
|
|
14624
|
+
var simulcastEnabled = !!av.simulcast;
|
|
14623
14625
|
var rtxEnabled = av.type === 'video';
|
|
14624
14626
|
egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
|
|
14625
14627
|
if (av.type === 'video') {
|
|
@@ -14680,15 +14682,25 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14680
14682
|
requestMedia(mediaType, mediaRequests) {
|
|
14681
14683
|
var _a;
|
|
14682
14684
|
var task = () => {
|
|
14685
|
+
var _a;
|
|
14683
14686
|
var jmpSession = this.jmpSessions.get(mediaType);
|
|
14684
14687
|
if (!jmpSession) {
|
|
14685
14688
|
logger$4.error("Unable to find jmp session for ".concat(mediaType));
|
|
14686
14689
|
return;
|
|
14687
14690
|
}
|
|
14688
|
-
|
|
14689
|
-
|
|
14690
|
-
|
|
14691
|
-
|
|
14691
|
+
var requestedReceiveSlotIds = [];
|
|
14692
|
+
mediaRequests.forEach(mr => mr.receiveSlots.forEach(rs => {
|
|
14693
|
+
if (!rs.id) {
|
|
14694
|
+
logger$4.error("Running subscribe task, but ReceiveSlot ID is missing!");
|
|
14695
|
+
return;
|
|
14696
|
+
}
|
|
14697
|
+
requestedReceiveSlotIds.push(rs.id);
|
|
14698
|
+
}));
|
|
14699
|
+
(_a = this.recvTransceivers.get(mediaType)) === null || _a === void 0 ? void 0 : _a.forEach(transceiver => {
|
|
14700
|
+
if (!requestedReceiveSlotIds.some(id => compareStreamIds(id, transceiver.receiveSlot.id))) {
|
|
14701
|
+
transceiver.receiveSlot._updateSource('no source', undefined);
|
|
14702
|
+
}
|
|
14703
|
+
});
|
|
14692
14704
|
jmpSession.sendRequests(mediaRequests.map(mr => mr._toJmpScrRequest()));
|
|
14693
14705
|
};
|
|
14694
14706
|
if (((_a = this.dataChannel) === null || _a === void 0 ? void 0 : _a.readyState) === 'open') {
|
|
@@ -14711,7 +14723,7 @@ class MultistreamConnection extends EventEmitter {
|
|
|
14711
14723
|
this.addMid(mediaType);
|
|
14712
14724
|
transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
|
|
14713
14725
|
direction: 'sendrecv',
|
|
14714
|
-
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily$1.Video ? this.getVideoEncodingOptions() : undefined
|
|
14726
|
+
sendEncodings: getMediaFamily$1(mediaType) === MediaFamily$1.Video ? this.getVideoEncodingOptions(getMediaContent(mediaType)) : undefined
|
|
14715
14727
|
}));
|
|
14716
14728
|
transceiver.csi = generateCsi(getMediaFamily$1(mediaType), mainSceneId);
|
|
14717
14729
|
(_a = this.jmpSessions.get(mediaType)) === null || _a === void 0 ? void 0 : _a.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-media-core",
|
|
3
|
-
"version": "1.35.
|
|
3
|
+
"version": "1.35.2",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/cjs",
|
|
6
6
|
"dist/esm",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@babel/runtime": "^7.18.9",
|
|
48
48
|
"@webex/json-multistream": "1.20.2",
|
|
49
49
|
"@webex/ts-sdp": "1.3.0",
|
|
50
|
-
"@webex/web-client-media-engine": "1.38.
|
|
50
|
+
"@webex/web-client-media-engine": "1.38.4",
|
|
51
51
|
"detectrtc": "^1.4.1",
|
|
52
52
|
"events": "^3.3.0",
|
|
53
53
|
"typed-emitter": "^2.1.0",
|