mediasoup-client 3.6.70 → 3.6.71

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.
@@ -1,5 +1,9 @@
1
1
  import { DtlsParameters } from '../../Transport';
2
2
  import { RtpCapabilities, RtpParameters } from '../../RtpParameters';
3
+ /**
4
+ * This function must be called with an SDP with 1 m=audio and 1 m=video
5
+ * sections.
6
+ */
3
7
  export declare function extractRtpCapabilities({ sdpObject }: {
4
8
  sdpObject: any;
5
9
  }): RtpCapabilities;
@@ -1 +1 @@
1
- {"version":3,"file":"commonUtils.d.ts","sourceRoot":"","sources":["../../../src/handlers/sdp/commonUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAY,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACN,eAAe,EAGf,aAAa,EAEb,MAAM,qBAAqB,CAAC;AAE7B,wBAAgB,sBAAsB,CACrC,EAAE,SAAS,EAAE,EACb;IAAE,SAAS,EAAE,GAAG,CAAA;CAAE,GAChB,eAAe,CAsHjB;AAED,wBAAgB,qBAAqB,CACpC,EAAE,SAAS,EAAE,EACb;IAAE,SAAS,EAAE,GAAG,CAAA;CAAE,GAChB,cAAc,CAuChB;AAED,wBAAgB,QAAQ,CACvB,EAAE,gBAAgB,EAAE,EACpB;IAAE,gBAAgB,EAAE,GAAG,CAAA;CAAE,GACvB,MAAM,CASR;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,EACC,kBAAkB,EAClB,iBAAiB,EACjB,EACD;IACC,kBAAkB,EAAE,aAAa,CAAC;IAClC,iBAAiB,EAAE,GAAG,CAAC;CACvB,GACC,IAAI,CAsDN"}
1
+ {"version":3,"file":"commonUtils.d.ts","sourceRoot":"","sources":["../../../src/handlers/sdp/commonUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAY,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACN,eAAe,EAGf,aAAa,EAEb,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,EAAE,SAAS,EAAE,EACb;IAAE,SAAS,EAAE,GAAG,CAAA;CAAE,GAChB,eAAe,CAuIjB;AAED,wBAAgB,qBAAqB,CACpC,EAAE,SAAS,EAAE,EACb;IAAE,SAAS,EAAE,GAAG,CAAA;CAAE,GAChB,cAAc,CAuChB;AAED,wBAAgB,QAAQ,CACvB,EAAE,gBAAgB,EAAE,EACpB;IAAE,gBAAgB,EAAE,GAAG,CAAA;CAAE,GACvB,MAAM,CASR;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CACnC,EACC,kBAAkB,EAClB,iBAAiB,EACjB,EACD;IACC,kBAAkB,EAAE,aAAa,CAAC;IAClC,iBAAiB,EAAE,GAAG,CAAC;CACvB,GACC,IAAI,CAsDN"}
@@ -25,6 +25,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.applyCodecParameters = exports.getCname = exports.extractDtlsParameters = exports.extractRtpCapabilities = void 0;
27
27
  const sdpTransform = __importStar(require("sdp-transform"));
28
+ /**
29
+ * This function must be called with an SDP with 1 m=audio and 1 m=video
30
+ * sections.
31
+ */
28
32
  function extractRtpCapabilities({ sdpObject }) {
29
33
  // Map of RtpCodecParameters indexed by payload type.
30
34
  const codecsMap = new Map();
@@ -81,16 +85,29 @@ function extractRtpCapabilities({ sdpObject }) {
81
85
  }
82
86
  // Get RTCP feedback for each codec.
83
87
  for (const fb of m.rtcpFb || []) {
84
- const codec = codecsMap.get(fb.payload);
85
- if (!codec)
86
- continue;
87
88
  const feedback = {
88
89
  type: fb.type,
89
90
  parameter: fb.subtype
90
91
  };
91
92
  if (!feedback.parameter)
92
93
  delete feedback.parameter;
93
- codec.rtcpFeedback.push(feedback);
94
+ // rtcp-fb payload is not '*', so just apply it to its corresponding
95
+ // codec.
96
+ if (fb.payload !== '*') {
97
+ const codec = codecsMap.get(fb.payload);
98
+ if (!codec)
99
+ continue;
100
+ codec.rtcpFeedback.push(feedback);
101
+ }
102
+ // If rtcp-fb payload is '*' it must be applied to all codecs with same
103
+ // kind (with some exceptions such as RTX codec).
104
+ else {
105
+ for (const codec of codecsMap.values()) {
106
+ if (codec.kind === kind && !/.+\/rtx$/i.test(codec.mimeType)) {
107
+ codec.rtcpFeedback.push(feedback);
108
+ }
109
+ }
110
+ }
94
111
  }
95
112
  // Get RTP header extensions.
96
113
  for (const ext of m.ext || []) {
package/lib/index.d.ts CHANGED
@@ -8,7 +8,7 @@ export { types };
8
8
  /**
9
9
  * Expose mediasoup-client version.
10
10
  */
11
- export declare const version = "3.6.70";
11
+ export declare const version = "3.6.71";
12
12
  /**
13
13
  * Expose Device class and detectDevice() helper.
14
14
  */
package/lib/index.js CHANGED
@@ -37,7 +37,7 @@ exports.types = types;
37
37
  /**
38
38
  * Expose mediasoup-client version.
39
39
  */
40
- exports.version = '3.6.70';
40
+ exports.version = '3.6.71';
41
41
  /**
42
42
  * Expose parseScalabilityMode() function.
43
43
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mediasoup-client",
3
- "version": "3.6.70",
3
+ "version": "3.6.71",
4
4
  "description": "mediasoup client side JavaScript library",
5
5
  "contributors": [
6
6
  "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
@@ -74,16 +74,16 @@
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/events": "^3.0.0",
77
- "@types/jest": "^29.2.5",
77
+ "@types/jest": "^29.2.6",
78
78
  "@types/sdp-transform": "^2.4.5",
79
79
  "@types/uuid": "^3.4.9",
80
- "@typescript-eslint/eslint-plugin": "^5.48.0",
81
- "@typescript-eslint/parser": "^5.48.0",
82
- "eslint": "^8.31.0",
83
- "eslint-plugin-jest": "^27.2.0",
80
+ "@typescript-eslint/eslint-plugin": "^5.48.2",
81
+ "@typescript-eslint/parser": "^5.48.2",
82
+ "eslint": "^8.32.0",
83
+ "eslint-plugin-jest": "^27.2.1",
84
84
  "jest": "^29.3.1",
85
85
  "open-cli": "^7.1.0",
86
- "ts-jest": "^29.0.3",
86
+ "ts-jest": "^29.0.5",
87
87
  "tsc-watch": "^6.0.0",
88
88
  "typescript": "^4.9.4"
89
89
  }