@webex/web-client-media-engine 3.11.4 → 3.11.6
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 +39 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +39 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +3 -4
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -1490,6 +1490,36 @@ class _LocalStream extends Stream {
|
|
|
1490
1490
|
getEffects() {
|
|
1491
1491
|
return this.effects;
|
|
1492
1492
|
}
|
|
1493
|
+
/**
|
|
1494
|
+
* Method to serialize data about input, output streams
|
|
1495
|
+
* and also effects from LocalStream.
|
|
1496
|
+
*
|
|
1497
|
+
* @returns - A JSON-compatible object representation with data from LocalStream.
|
|
1498
|
+
*/
|
|
1499
|
+
toJSON() {
|
|
1500
|
+
return {
|
|
1501
|
+
muted: this.muted,
|
|
1502
|
+
label: this.label,
|
|
1503
|
+
readyState: this.readyState,
|
|
1504
|
+
inputStream: {
|
|
1505
|
+
active: this.inputStream.active,
|
|
1506
|
+
id: this.inputStream.id,
|
|
1507
|
+
enabled: this.inputTrack.enabled,
|
|
1508
|
+
muted: this.inputTrack.muted,
|
|
1509
|
+
},
|
|
1510
|
+
outputStream: {
|
|
1511
|
+
active: this.outputStream.active,
|
|
1512
|
+
id: this.outputStream.id,
|
|
1513
|
+
},
|
|
1514
|
+
effects: this.effects.map((effect) => {
|
|
1515
|
+
return {
|
|
1516
|
+
id: effect.id,
|
|
1517
|
+
kind: effect.kind,
|
|
1518
|
+
isEnabled: effect.isEnabled,
|
|
1519
|
+
};
|
|
1520
|
+
}),
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1493
1523
|
/**
|
|
1494
1524
|
* Cleanup the local effects.
|
|
1495
1525
|
*/
|
|
@@ -14480,10 +14510,11 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14480
14510
|
});
|
|
14481
14511
|
jmpSession.on(JmpSessionEvents.MediaRequestReceived, (data) => {
|
|
14482
14512
|
logger.log(`MediaRequest received: ${JSON.stringify(data)}`);
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14513
|
+
this.updateRequestedStreams(mediaType, data.requests).then(() => {
|
|
14514
|
+
if (getMediaFamily(mediaType) === exports.MediaFamily.Video) {
|
|
14515
|
+
this.sendMediaRequestStatus(mediaType);
|
|
14516
|
+
}
|
|
14517
|
+
});
|
|
14487
14518
|
});
|
|
14488
14519
|
jmpSession.on(JmpSessionEvents.ActiveSpeaker, (data) => {
|
|
14489
14520
|
this.emit(exports.MultistreamConnectionEventNames.ActiveSpeakerNotification, data.csis);
|
|
@@ -14532,7 +14563,7 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14532
14563
|
logger.warn(`${mediaType}: Unable to find matching stream ID for requested ID: ${JSON.stringify(id)}`);
|
|
14533
14564
|
}
|
|
14534
14565
|
});
|
|
14535
|
-
sendTransceiver.updateSendParameters(requestedIdEncodingParamsMap);
|
|
14566
|
+
return sendTransceiver.updateSendParameters(requestedIdEncodingParamsMap);
|
|
14536
14567
|
}
|
|
14537
14568
|
createDataChannel() {
|
|
14538
14569
|
const dataChannel = this.pc.createDataChannel('datachannel', {
|
|
@@ -14596,6 +14627,9 @@ class MultistreamConnection extends EventEmitter$2 {
|
|
|
14596
14627
|
if (getMediaFamily(mediaType) !== exports.MediaFamily.Video) {
|
|
14597
14628
|
return;
|
|
14598
14629
|
}
|
|
14630
|
+
if (!this.getSendTransceiverOrThrow(mediaType).requested) {
|
|
14631
|
+
return;
|
|
14632
|
+
}
|
|
14599
14633
|
const streamStates = this.getVideoStreamStates(mediaType);
|
|
14600
14634
|
const task = () => {
|
|
14601
14635
|
var _a;
|