@webex/web-client-media-engine 3.11.5 → 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 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
  */