mediasoup-client 3.7.2 → 3.7.4
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/README.md +4 -4
- package/lib/Transport.d.ts +6 -1
- package/lib/Transport.d.ts.map +1 -1
- package/lib/handlers/sdp/MediaSection.d.ts.map +1 -1
- package/lib/handlers/sdp/MediaSection.js +3 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/ortc.d.ts +4 -58
- package/lib/ortc.d.ts.map +1 -1
- package/lib/ortc.js +344 -380
- package/lib/test/fakeParameters.d.ts.map +1 -1
- package/lib/test/fakeParameters.js +2 -0
- package/lib/test/test.js +5 -3
- package/npm-scripts.mjs +6 -8
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ const device = new Device();
|
|
|
25
25
|
|
|
26
26
|
// Communicate with our server app to retrieve router RTP capabilities.
|
|
27
27
|
const routerRtpCapabilities = await mySignaling.request(
|
|
28
|
-
'getRouterCapabilities'
|
|
28
|
+
'getRouterCapabilities'
|
|
29
29
|
);
|
|
30
30
|
|
|
31
31
|
// Load the device with the router RTP capabilities.
|
|
@@ -89,7 +89,7 @@ sendTransport.on(
|
|
|
89
89
|
// Something was wrong in server side.
|
|
90
90
|
errback(error);
|
|
91
91
|
}
|
|
92
|
-
}
|
|
92
|
+
}
|
|
93
93
|
);
|
|
94
94
|
|
|
95
95
|
// Set transport "producedata" event handler.
|
|
@@ -98,7 +98,7 @@ sendTransport.on(
|
|
|
98
98
|
async (
|
|
99
99
|
{ sctpStreamParameters, label, protocol, appData },
|
|
100
100
|
callback,
|
|
101
|
-
errback
|
|
101
|
+
errback
|
|
102
102
|
) => {
|
|
103
103
|
// Here we must communicate our local parameters to our remote transport.
|
|
104
104
|
try {
|
|
@@ -116,7 +116,7 @@ sendTransport.on(
|
|
|
116
116
|
// Something was wrong in server side.
|
|
117
117
|
errback(error);
|
|
118
118
|
}
|
|
119
|
-
}
|
|
119
|
+
}
|
|
120
120
|
);
|
|
121
121
|
|
|
122
122
|
// Produce our webcam video.
|
package/lib/Transport.d.ts
CHANGED
|
@@ -49,7 +49,12 @@ export type IceCandidate = {
|
|
|
49
49
|
*/
|
|
50
50
|
priority: number;
|
|
51
51
|
/**
|
|
52
|
-
* The IP address of the candidate.
|
|
52
|
+
* The IP address or hostname of the candidate.
|
|
53
|
+
*/
|
|
54
|
+
address: string;
|
|
55
|
+
/**
|
|
56
|
+
* The IP address or hostname of the candidate.
|
|
57
|
+
* @deprecated Use |address| instead.
|
|
53
58
|
*/
|
|
54
59
|
ip: string;
|
|
55
60
|
/**
|
package/lib/Transport.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transport.d.ts","sourceRoot":"","sources":["../src/Transport.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EACN,cAAc,EACd,gBAAgB,EAEhB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAIlC,MAAM,MAAM,gBAAgB,CAAC,gBAAgB,SAAS,OAAO,GAAG,OAAO,IAAI;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,aAAa,CAAC;IAC7B,aAAa,EAAE,YAAY,EAAE,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["../../../src/handlers/sdp/MediaSection.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,aAAa,EACb,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACN,SAAS,EACT,aAAa,EAIb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,8BAAsB,YAAY;IAEjC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC;IAErC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBAEvB,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAa,GACb,EAAE;QACF,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;QAC/B,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,KAAK,EAAE,OAAO,CAAC;KACf;
|
|
1
|
+
{"version":3,"file":"MediaSection.d.ts","sourceRoot":"","sources":["../../../src/handlers/sdp/MediaSection.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,aAAa,EACb,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,kBAAkB,EAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACN,SAAS,EACT,aAAa,EAIb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,8BAAsB,YAAY;IAEjC,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC;IAErC,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;gBAEvB,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,KAAa,GACb,EAAE;QACF,aAAa,CAAC,EAAE,aAAa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Q,YAAY;gBACtC,EACX,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,KAAa,EACb,GAAG,EACH,IAAI,EACJ,kBAAkB,EAClB,QAAQ,EACR,OAAO,EACP,kBAA0B,GAC1B,EAAE;QACF,aAAa,CAAC,EAAE,aAAa,CAAC;QAC9B,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;QAC/B,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,cAAc,CAAC,EAAE,cAAc,CAAC;QAChC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;QACxC,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,SAAS,GAAG,aAAa,CAAC;QAChC,kBAAkB,CAAC,EAAE,aAAa,CAAC;QACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC7B;IAsKD,WAAW,CAAC,IAAI,EAAE,QAAQ,GAAG,IAAI;IAKjC,MAAM,IAAI,IAAI;IAId,YAAY,CAAC,EACZ,kBAAkB,EAClB,QAAQ,EACR,OAAO,GACP,EAAE;QACF,kBAAkB,EAAE,aAAa,CAAC;QAClC,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KAChB,GAAG,IAAI;IAiGR,kBAAkB,CAAC,EAClB,kBAAkB,GAClB,EAAE;QACF,kBAAkB,EAAE,aAAa,CAAC;KAClC,GAAG,IAAI;CAgBR"}
|
|
@@ -41,7 +41,9 @@ class MediaSection {
|
|
|
41
41
|
// RTP (1).
|
|
42
42
|
candidateObject.component = 1;
|
|
43
43
|
candidateObject.foundation = candidate.foundation;
|
|
44
|
-
|
|
44
|
+
// Be ready for new candidate.address field in mediasoup server side
|
|
45
|
+
// field and keep backward compatibility with deprecated candidate.ip.
|
|
46
|
+
candidateObject.ip = candidate.address ?? candidate.ip;
|
|
45
47
|
candidateObject.port = candidate.port;
|
|
46
48
|
candidateObject.priority = candidate.priority;
|
|
47
49
|
candidateObject.transport = candidate.protocol;
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/lib/ortc.d.ts
CHANGED
|
@@ -1,29 +1,11 @@
|
|
|
1
|
-
import { RtpCapabilities, MediaKind, RtpCodecCapability,
|
|
2
|
-
import { SctpCapabilities,
|
|
1
|
+
import { RtpCapabilities, MediaKind, RtpCodecCapability, RtpParameters, RtpCodecParameters } from './RtpParameters';
|
|
2
|
+
import { SctpCapabilities, SctpStreamParameters } from './SctpParameters';
|
|
3
3
|
/**
|
|
4
4
|
* Validates RtpCapabilities. It may modify given data by adding missing
|
|
5
5
|
* fields with default values.
|
|
6
6
|
* It throws if invalid.
|
|
7
7
|
*/
|
|
8
8
|
export declare function validateRtpCapabilities(caps: RtpCapabilities): void;
|
|
9
|
-
/**
|
|
10
|
-
* Validates RtpCodecCapability. It may modify given data by adding missing
|
|
11
|
-
* fields with default values.
|
|
12
|
-
* It throws if invalid.
|
|
13
|
-
*/
|
|
14
|
-
export declare function validateRtpCodecCapability(codec: RtpCodecCapability): void;
|
|
15
|
-
/**
|
|
16
|
-
* Validates RtcpFeedback. It may modify given data by adding missing
|
|
17
|
-
* fields with default values.
|
|
18
|
-
* It throws if invalid.
|
|
19
|
-
*/
|
|
20
|
-
export declare function validateRtcpFeedback(fb: RtcpFeedback): void;
|
|
21
|
-
/**
|
|
22
|
-
* Validates RtpHeaderExtension. It may modify given data by adding missing
|
|
23
|
-
* fields with default values.
|
|
24
|
-
* It throws if invalid.
|
|
25
|
-
*/
|
|
26
|
-
export declare function validateRtpHeaderExtension(ext: RtpHeaderExtension): void;
|
|
27
9
|
/**
|
|
28
10
|
* Validates RtpParameters. It may modify given data by adding missing
|
|
29
11
|
* fields with default values.
|
|
@@ -31,53 +13,17 @@ export declare function validateRtpHeaderExtension(ext: RtpHeaderExtension): voi
|
|
|
31
13
|
*/
|
|
32
14
|
export declare function validateRtpParameters(params: RtpParameters): void;
|
|
33
15
|
/**
|
|
34
|
-
* Validates
|
|
35
|
-
* fields with default values.
|
|
36
|
-
* It throws if invalid.
|
|
37
|
-
*/
|
|
38
|
-
export declare function validateRtpCodecParameters(codec: RtpCodecParameters): void;
|
|
39
|
-
/**
|
|
40
|
-
* Validates RtpHeaderExtensionParameteters. It may modify given data by adding missing
|
|
41
|
-
* fields with default values.
|
|
42
|
-
* It throws if invalid.
|
|
43
|
-
*/
|
|
44
|
-
export declare function validateRtpHeaderExtensionParameters(ext: RtpHeaderExtensionParameters): void;
|
|
45
|
-
/**
|
|
46
|
-
* Validates RtpEncodingParameters. It may modify given data by adding missing
|
|
47
|
-
* fields with default values.
|
|
48
|
-
* It throws if invalid.
|
|
49
|
-
*/
|
|
50
|
-
export declare function validateRtpEncodingParameters(encoding: RtpEncodingParameters): void;
|
|
51
|
-
/**
|
|
52
|
-
* Validates RtcpParameters. It may modify given data by adding missing
|
|
16
|
+
* Validates SctpStreamParameters. It may modify given data by adding missing
|
|
53
17
|
* fields with default values.
|
|
54
18
|
* It throws if invalid.
|
|
55
19
|
*/
|
|
56
|
-
export declare function
|
|
20
|
+
export declare function validateSctpStreamParameters(params: SctpStreamParameters): void;
|
|
57
21
|
/**
|
|
58
22
|
* Validates SctpCapabilities. It may modify given data by adding missing
|
|
59
23
|
* fields with default values.
|
|
60
24
|
* It throws if invalid.
|
|
61
25
|
*/
|
|
62
26
|
export declare function validateSctpCapabilities(caps: SctpCapabilities): void;
|
|
63
|
-
/**
|
|
64
|
-
* Validates NumSctpStreams. It may modify given data by adding missing
|
|
65
|
-
* fields with default values.
|
|
66
|
-
* It throws if invalid.
|
|
67
|
-
*/
|
|
68
|
-
export declare function validateNumSctpStreams(numStreams: NumSctpStreams): void;
|
|
69
|
-
/**
|
|
70
|
-
* Validates SctpParameters. It may modify given data by adding missing
|
|
71
|
-
* fields with default values.
|
|
72
|
-
* It throws if invalid.
|
|
73
|
-
*/
|
|
74
|
-
export declare function validateSctpParameters(params: SctpParameters): void;
|
|
75
|
-
/**
|
|
76
|
-
* Validates SctpStreamParameters. It may modify given data by adding missing
|
|
77
|
-
* fields with default values.
|
|
78
|
-
* It throws if invalid.
|
|
79
|
-
*/
|
|
80
|
-
export declare function validateSctpStreamParameters(params: SctpStreamParameters): void;
|
|
81
27
|
/**
|
|
82
28
|
* Generate extended RTP capabilities for sending and receiving.
|
|
83
29
|
*/
|
package/lib/ortc.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ortc.d.ts","sourceRoot":"","sources":["../src/ortc.ts"],"names":[],"mappings":"AACA,OAAO,EACN,eAAe,EACf,SAAS,EACT,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ortc.d.ts","sourceRoot":"","sources":["../src/ortc.ts"],"names":[],"mappings":"AACA,OAAO,EACN,eAAe,EACf,SAAS,EACT,kBAAkB,EAElB,aAAa,EACb,kBAAkB,EAKlB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,gBAAgB,EAEhB,oBAAoB,EACpB,MAAM,kBAAkB,CAAC;AAO1B;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CA0BnE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAiDjE;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC3C,MAAM,EAAE,oBAAoB,GAC1B,IAAI,CA8DN;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAWrE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACzC,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,eAAe,GACzB,GAAG,CA8GL;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACrC,uBAAuB,EAAE,GAAG,GAC1B,eAAe,CA6DjB;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACtC,IAAI,EAAE,SAAS,EACf,uBAAuB,EAAE,GAAG,GAC1B,aAAa,CA8Df;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC5C,IAAI,EAAE,SAAS,EACf,uBAAuB,EAAE,GAAG,GAC1B,aAAa,CA+Ff;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,kBAAkB,EAAE,EAC5B,QAAQ,CAAC,EAAE,kBAAkB,GAC3B,kBAAkB,EAAE,CA+BtB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC5C,kBAAkB,EAAE,aAAa,GAC/B,aAAa,CAoBf;AAED;;GAEG;AACH,wBAAgB,OAAO,CACtB,IAAI,EAAE,SAAS,EACf,uBAAuB,EAAE,GAAG,GAC1B,OAAO,CAIT;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACzB,aAAa,EAAE,aAAa,EAC5B,uBAAuB,EAAE,GAAG,GAC1B,OAAO,CAaT"}
|
package/lib/ortc.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.canReceive = exports.canSend = exports.generateProbatorRtpParameters = exports.reduceCodecs = exports.getSendingRemoteRtpParameters = exports.getSendingRtpParameters = exports.getRecvRtpCapabilities = exports.getExtendedRtpCapabilities = exports.
|
|
26
|
+
exports.canReceive = exports.canSend = exports.generateProbatorRtpParameters = exports.reduceCodecs = exports.getSendingRemoteRtpParameters = exports.getSendingRtpParameters = exports.getRecvRtpCapabilities = exports.getExtendedRtpCapabilities = exports.validateSctpCapabilities = exports.validateSctpStreamParameters = exports.validateRtpParameters = exports.validateRtpCapabilities = void 0;
|
|
27
27
|
const h264 = __importStar(require("h264-profile-level-id"));
|
|
28
28
|
const utils = __importStar(require("./utils"));
|
|
29
29
|
const RTP_PROBATOR_MID = 'probator';
|
|
@@ -60,129 +60,6 @@ function validateRtpCapabilities(caps) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
exports.validateRtpCapabilities = validateRtpCapabilities;
|
|
63
|
-
/**
|
|
64
|
-
* Validates RtpCodecCapability. It may modify given data by adding missing
|
|
65
|
-
* fields with default values.
|
|
66
|
-
* It throws if invalid.
|
|
67
|
-
*/
|
|
68
|
-
function validateRtpCodecCapability(codec) {
|
|
69
|
-
const MimeTypeRegex = new RegExp('^(audio|video)/(.+)', 'i');
|
|
70
|
-
if (typeof codec !== 'object') {
|
|
71
|
-
throw new TypeError('codec is not an object');
|
|
72
|
-
}
|
|
73
|
-
// mimeType is mandatory.
|
|
74
|
-
if (!codec.mimeType || typeof codec.mimeType !== 'string') {
|
|
75
|
-
throw new TypeError('missing codec.mimeType');
|
|
76
|
-
}
|
|
77
|
-
const mimeTypeMatch = MimeTypeRegex.exec(codec.mimeType);
|
|
78
|
-
if (!mimeTypeMatch) {
|
|
79
|
-
throw new TypeError('invalid codec.mimeType');
|
|
80
|
-
}
|
|
81
|
-
// Just override kind with media component of mimeType.
|
|
82
|
-
codec.kind = mimeTypeMatch[1].toLowerCase();
|
|
83
|
-
// preferredPayloadType is optional.
|
|
84
|
-
if (codec.preferredPayloadType &&
|
|
85
|
-
typeof codec.preferredPayloadType !== 'number') {
|
|
86
|
-
throw new TypeError('invalid codec.preferredPayloadType');
|
|
87
|
-
}
|
|
88
|
-
// clockRate is mandatory.
|
|
89
|
-
if (typeof codec.clockRate !== 'number') {
|
|
90
|
-
throw new TypeError('missing codec.clockRate');
|
|
91
|
-
}
|
|
92
|
-
// channels is optional. If unset, set it to 1 (just if audio).
|
|
93
|
-
if (codec.kind === 'audio') {
|
|
94
|
-
if (typeof codec.channels !== 'number') {
|
|
95
|
-
codec.channels = 1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
delete codec.channels;
|
|
100
|
-
}
|
|
101
|
-
// parameters is optional. If unset, set it to an empty object.
|
|
102
|
-
if (!codec.parameters || typeof codec.parameters !== 'object') {
|
|
103
|
-
codec.parameters = {};
|
|
104
|
-
}
|
|
105
|
-
for (const key of Object.keys(codec.parameters)) {
|
|
106
|
-
let value = codec.parameters[key];
|
|
107
|
-
if (value === undefined) {
|
|
108
|
-
codec.parameters[key] = '';
|
|
109
|
-
value = '';
|
|
110
|
-
}
|
|
111
|
-
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
112
|
-
throw new TypeError(`invalid codec parameter [key:${key}s, value:${value}]`);
|
|
113
|
-
}
|
|
114
|
-
// Specific parameters validation.
|
|
115
|
-
if (key === 'apt') {
|
|
116
|
-
if (typeof value !== 'number') {
|
|
117
|
-
throw new TypeError('invalid codec apt parameter');
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
// rtcpFeedback is optional. If unset, set it to an empty array.
|
|
122
|
-
if (!codec.rtcpFeedback || !Array.isArray(codec.rtcpFeedback)) {
|
|
123
|
-
codec.rtcpFeedback = [];
|
|
124
|
-
}
|
|
125
|
-
for (const fb of codec.rtcpFeedback) {
|
|
126
|
-
validateRtcpFeedback(fb);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
exports.validateRtpCodecCapability = validateRtpCodecCapability;
|
|
130
|
-
/**
|
|
131
|
-
* Validates RtcpFeedback. It may modify given data by adding missing
|
|
132
|
-
* fields with default values.
|
|
133
|
-
* It throws if invalid.
|
|
134
|
-
*/
|
|
135
|
-
function validateRtcpFeedback(fb) {
|
|
136
|
-
if (typeof fb !== 'object') {
|
|
137
|
-
throw new TypeError('fb is not an object');
|
|
138
|
-
}
|
|
139
|
-
// type is mandatory.
|
|
140
|
-
if (!fb.type || typeof fb.type !== 'string') {
|
|
141
|
-
throw new TypeError('missing fb.type');
|
|
142
|
-
}
|
|
143
|
-
// parameter is optional. If unset set it to an empty string.
|
|
144
|
-
if (!fb.parameter || typeof fb.parameter !== 'string') {
|
|
145
|
-
fb.parameter = '';
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
exports.validateRtcpFeedback = validateRtcpFeedback;
|
|
149
|
-
/**
|
|
150
|
-
* Validates RtpHeaderExtension. It may modify given data by adding missing
|
|
151
|
-
* fields with default values.
|
|
152
|
-
* It throws if invalid.
|
|
153
|
-
*/
|
|
154
|
-
function validateRtpHeaderExtension(ext) {
|
|
155
|
-
if (typeof ext !== 'object') {
|
|
156
|
-
throw new TypeError('ext is not an object');
|
|
157
|
-
}
|
|
158
|
-
// kind is mandatory.
|
|
159
|
-
if (ext.kind !== 'audio' && ext.kind !== 'video') {
|
|
160
|
-
throw new TypeError('invalid ext.kind');
|
|
161
|
-
}
|
|
162
|
-
// uri is mandatory.
|
|
163
|
-
if (!ext.uri || typeof ext.uri !== 'string') {
|
|
164
|
-
throw new TypeError('missing ext.uri');
|
|
165
|
-
}
|
|
166
|
-
// preferredId is mandatory.
|
|
167
|
-
if (typeof ext.preferredId !== 'number') {
|
|
168
|
-
throw new TypeError('missing ext.preferredId');
|
|
169
|
-
}
|
|
170
|
-
// preferredEncrypt is optional. If unset set it to false.
|
|
171
|
-
if (ext.preferredEncrypt && typeof ext.preferredEncrypt !== 'boolean') {
|
|
172
|
-
throw new TypeError('invalid ext.preferredEncrypt');
|
|
173
|
-
}
|
|
174
|
-
else if (!ext.preferredEncrypt) {
|
|
175
|
-
ext.preferredEncrypt = false;
|
|
176
|
-
}
|
|
177
|
-
// direction is optional. If unset set it to sendrecv.
|
|
178
|
-
if (ext.direction && typeof ext.direction !== 'string') {
|
|
179
|
-
throw new TypeError('invalid ext.direction');
|
|
180
|
-
}
|
|
181
|
-
else if (!ext.direction) {
|
|
182
|
-
ext.direction = 'sendrecv';
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
exports.validateRtpHeaderExtension = validateRtpHeaderExtension;
|
|
186
63
|
/**
|
|
187
64
|
* Validates RtpParameters. It may modify given data by adding missing
|
|
188
65
|
* fields with default values.
|
|
@@ -234,283 +111,75 @@ function validateRtpParameters(params) {
|
|
|
234
111
|
}
|
|
235
112
|
exports.validateRtpParameters = validateRtpParameters;
|
|
236
113
|
/**
|
|
237
|
-
* Validates
|
|
114
|
+
* Validates SctpStreamParameters. It may modify given data by adding missing
|
|
238
115
|
* fields with default values.
|
|
239
116
|
* It throws if invalid.
|
|
240
117
|
*/
|
|
241
|
-
function
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
throw new TypeError('codec is not an object');
|
|
118
|
+
function validateSctpStreamParameters(params) {
|
|
119
|
+
if (typeof params !== 'object') {
|
|
120
|
+
throw new TypeError('params is not an object');
|
|
245
121
|
}
|
|
246
|
-
//
|
|
247
|
-
if (
|
|
248
|
-
throw new TypeError('missing
|
|
122
|
+
// streamId is mandatory.
|
|
123
|
+
if (typeof params.streamId !== 'number') {
|
|
124
|
+
throw new TypeError('missing params.streamId');
|
|
249
125
|
}
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
126
|
+
// ordered is optional.
|
|
127
|
+
let orderedGiven = false;
|
|
128
|
+
if (typeof params.ordered === 'boolean') {
|
|
129
|
+
orderedGiven = true;
|
|
253
130
|
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
throw new TypeError('missing codec.payloadType');
|
|
131
|
+
else {
|
|
132
|
+
params.ordered = true;
|
|
257
133
|
}
|
|
258
|
-
//
|
|
259
|
-
if (
|
|
260
|
-
|
|
134
|
+
// maxPacketLifeTime is optional.
|
|
135
|
+
if (params.maxPacketLifeTime &&
|
|
136
|
+
typeof params.maxPacketLifeTime !== 'number') {
|
|
137
|
+
throw new TypeError('invalid params.maxPacketLifeTime');
|
|
261
138
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
if (typeof codec.channels !== 'number') {
|
|
266
|
-
codec.channels = 1;
|
|
267
|
-
}
|
|
139
|
+
// maxRetransmits is optional.
|
|
140
|
+
if (params.maxRetransmits && typeof params.maxRetransmits !== 'number') {
|
|
141
|
+
throw new TypeError('invalid params.maxRetransmits');
|
|
268
142
|
}
|
|
269
|
-
|
|
270
|
-
|
|
143
|
+
if (params.maxPacketLifeTime && params.maxRetransmits) {
|
|
144
|
+
throw new TypeError('cannot provide both maxPacketLifeTime and maxRetransmits');
|
|
271
145
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
146
|
+
if (orderedGiven &&
|
|
147
|
+
params.ordered &&
|
|
148
|
+
(params.maxPacketLifeTime || params.maxRetransmits)) {
|
|
149
|
+
throw new TypeError('cannot be ordered with maxPacketLifeTime or maxRetransmits');
|
|
275
150
|
}
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
codec.parameters[key] = '';
|
|
280
|
-
value = '';
|
|
281
|
-
}
|
|
282
|
-
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
283
|
-
throw new TypeError(`invalid codec parameter [key:${key}s, value:${value}]`);
|
|
284
|
-
}
|
|
285
|
-
// Specific parameters validation.
|
|
286
|
-
if (key === 'apt') {
|
|
287
|
-
if (typeof value !== 'number') {
|
|
288
|
-
throw new TypeError('invalid codec apt parameter');
|
|
289
|
-
}
|
|
290
|
-
}
|
|
151
|
+
else if (!orderedGiven &&
|
|
152
|
+
(params.maxPacketLifeTime || params.maxRetransmits)) {
|
|
153
|
+
params.ordered = false;
|
|
291
154
|
}
|
|
292
|
-
//
|
|
293
|
-
if (
|
|
294
|
-
|
|
155
|
+
// label is optional.
|
|
156
|
+
if (params.label && typeof params.label !== 'string') {
|
|
157
|
+
throw new TypeError('invalid params.label');
|
|
295
158
|
}
|
|
296
|
-
|
|
297
|
-
|
|
159
|
+
// protocol is optional.
|
|
160
|
+
if (params.protocol && typeof params.protocol !== 'string') {
|
|
161
|
+
throw new TypeError('invalid params.protocol');
|
|
298
162
|
}
|
|
299
163
|
}
|
|
300
|
-
exports.
|
|
164
|
+
exports.validateSctpStreamParameters = validateSctpStreamParameters;
|
|
301
165
|
/**
|
|
302
|
-
* Validates
|
|
166
|
+
* Validates SctpCapabilities. It may modify given data by adding missing
|
|
303
167
|
* fields with default values.
|
|
304
168
|
* It throws if invalid.
|
|
305
169
|
*/
|
|
306
|
-
function
|
|
307
|
-
if (typeof
|
|
308
|
-
throw new TypeError('
|
|
309
|
-
}
|
|
310
|
-
// uri is mandatory.
|
|
311
|
-
if (!ext.uri || typeof ext.uri !== 'string') {
|
|
312
|
-
throw new TypeError('missing ext.uri');
|
|
313
|
-
}
|
|
314
|
-
// id is mandatory.
|
|
315
|
-
if (typeof ext.id !== 'number') {
|
|
316
|
-
throw new TypeError('missing ext.id');
|
|
317
|
-
}
|
|
318
|
-
// encrypt is optional. If unset set it to false.
|
|
319
|
-
if (ext.encrypt && typeof ext.encrypt !== 'boolean') {
|
|
320
|
-
throw new TypeError('invalid ext.encrypt');
|
|
321
|
-
}
|
|
322
|
-
else if (!ext.encrypt) {
|
|
323
|
-
ext.encrypt = false;
|
|
324
|
-
}
|
|
325
|
-
// parameters is optional. If unset, set it to an empty object.
|
|
326
|
-
if (!ext.parameters || typeof ext.parameters !== 'object') {
|
|
327
|
-
ext.parameters = {};
|
|
170
|
+
function validateSctpCapabilities(caps) {
|
|
171
|
+
if (typeof caps !== 'object') {
|
|
172
|
+
throw new TypeError('caps is not an object');
|
|
328
173
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
ext.parameters[key] = '';
|
|
333
|
-
value = '';
|
|
334
|
-
}
|
|
335
|
-
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
336
|
-
throw new TypeError('invalid header extension parameter');
|
|
337
|
-
}
|
|
174
|
+
// numStreams is mandatory.
|
|
175
|
+
if (!caps.numStreams || typeof caps.numStreams !== 'object') {
|
|
176
|
+
throw new TypeError('missing caps.numStreams');
|
|
338
177
|
}
|
|
178
|
+
validateNumSctpStreams(caps.numStreams);
|
|
339
179
|
}
|
|
340
|
-
exports.
|
|
180
|
+
exports.validateSctpCapabilities = validateSctpCapabilities;
|
|
341
181
|
/**
|
|
342
|
-
*
|
|
343
|
-
* fields with default values.
|
|
344
|
-
* It throws if invalid.
|
|
345
|
-
*/
|
|
346
|
-
function validateRtpEncodingParameters(encoding) {
|
|
347
|
-
if (typeof encoding !== 'object') {
|
|
348
|
-
throw new TypeError('encoding is not an object');
|
|
349
|
-
}
|
|
350
|
-
// ssrc is optional.
|
|
351
|
-
if (encoding.ssrc && typeof encoding.ssrc !== 'number') {
|
|
352
|
-
throw new TypeError('invalid encoding.ssrc');
|
|
353
|
-
}
|
|
354
|
-
// rid is optional.
|
|
355
|
-
if (encoding.rid && typeof encoding.rid !== 'string') {
|
|
356
|
-
throw new TypeError('invalid encoding.rid');
|
|
357
|
-
}
|
|
358
|
-
// rtx is optional.
|
|
359
|
-
if (encoding.rtx && typeof encoding.rtx !== 'object') {
|
|
360
|
-
throw new TypeError('invalid encoding.rtx');
|
|
361
|
-
}
|
|
362
|
-
else if (encoding.rtx) {
|
|
363
|
-
// RTX ssrc is mandatory if rtx is present.
|
|
364
|
-
if (typeof encoding.rtx.ssrc !== 'number') {
|
|
365
|
-
throw new TypeError('missing encoding.rtx.ssrc');
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
// dtx is optional. If unset set it to false.
|
|
369
|
-
if (!encoding.dtx || typeof encoding.dtx !== 'boolean') {
|
|
370
|
-
encoding.dtx = false;
|
|
371
|
-
}
|
|
372
|
-
// scalabilityMode is optional.
|
|
373
|
-
if (encoding.scalabilityMode &&
|
|
374
|
-
typeof encoding.scalabilityMode !== 'string') {
|
|
375
|
-
throw new TypeError('invalid encoding.scalabilityMode');
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
exports.validateRtpEncodingParameters = validateRtpEncodingParameters;
|
|
379
|
-
/**
|
|
380
|
-
* Validates RtcpParameters. It may modify given data by adding missing
|
|
381
|
-
* fields with default values.
|
|
382
|
-
* It throws if invalid.
|
|
383
|
-
*/
|
|
384
|
-
function validateRtcpParameters(rtcp) {
|
|
385
|
-
if (typeof rtcp !== 'object') {
|
|
386
|
-
throw new TypeError('rtcp is not an object');
|
|
387
|
-
}
|
|
388
|
-
// cname is optional.
|
|
389
|
-
if (rtcp.cname && typeof rtcp.cname !== 'string') {
|
|
390
|
-
throw new TypeError('invalid rtcp.cname');
|
|
391
|
-
}
|
|
392
|
-
// reducedSize is optional. If unset set it to true.
|
|
393
|
-
if (!rtcp.reducedSize || typeof rtcp.reducedSize !== 'boolean') {
|
|
394
|
-
rtcp.reducedSize = true;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
exports.validateRtcpParameters = validateRtcpParameters;
|
|
398
|
-
/**
|
|
399
|
-
* Validates SctpCapabilities. It may modify given data by adding missing
|
|
400
|
-
* fields with default values.
|
|
401
|
-
* It throws if invalid.
|
|
402
|
-
*/
|
|
403
|
-
function validateSctpCapabilities(caps) {
|
|
404
|
-
if (typeof caps !== 'object') {
|
|
405
|
-
throw new TypeError('caps is not an object');
|
|
406
|
-
}
|
|
407
|
-
// numStreams is mandatory.
|
|
408
|
-
if (!caps.numStreams || typeof caps.numStreams !== 'object') {
|
|
409
|
-
throw new TypeError('missing caps.numStreams');
|
|
410
|
-
}
|
|
411
|
-
validateNumSctpStreams(caps.numStreams);
|
|
412
|
-
}
|
|
413
|
-
exports.validateSctpCapabilities = validateSctpCapabilities;
|
|
414
|
-
/**
|
|
415
|
-
* Validates NumSctpStreams. It may modify given data by adding missing
|
|
416
|
-
* fields with default values.
|
|
417
|
-
* It throws if invalid.
|
|
418
|
-
*/
|
|
419
|
-
function validateNumSctpStreams(numStreams) {
|
|
420
|
-
if (typeof numStreams !== 'object') {
|
|
421
|
-
throw new TypeError('numStreams is not an object');
|
|
422
|
-
}
|
|
423
|
-
// OS is mandatory.
|
|
424
|
-
if (typeof numStreams.OS !== 'number') {
|
|
425
|
-
throw new TypeError('missing numStreams.OS');
|
|
426
|
-
}
|
|
427
|
-
// MIS is mandatory.
|
|
428
|
-
if (typeof numStreams.MIS !== 'number') {
|
|
429
|
-
throw new TypeError('missing numStreams.MIS');
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
exports.validateNumSctpStreams = validateNumSctpStreams;
|
|
433
|
-
/**
|
|
434
|
-
* Validates SctpParameters. It may modify given data by adding missing
|
|
435
|
-
* fields with default values.
|
|
436
|
-
* It throws if invalid.
|
|
437
|
-
*/
|
|
438
|
-
function validateSctpParameters(params) {
|
|
439
|
-
if (typeof params !== 'object') {
|
|
440
|
-
throw new TypeError('params is not an object');
|
|
441
|
-
}
|
|
442
|
-
// port is mandatory.
|
|
443
|
-
if (typeof params.port !== 'number') {
|
|
444
|
-
throw new TypeError('missing params.port');
|
|
445
|
-
}
|
|
446
|
-
// OS is mandatory.
|
|
447
|
-
if (typeof params.OS !== 'number') {
|
|
448
|
-
throw new TypeError('missing params.OS');
|
|
449
|
-
}
|
|
450
|
-
// MIS is mandatory.
|
|
451
|
-
if (typeof params.MIS !== 'number') {
|
|
452
|
-
throw new TypeError('missing params.MIS');
|
|
453
|
-
}
|
|
454
|
-
// maxMessageSize is mandatory.
|
|
455
|
-
if (typeof params.maxMessageSize !== 'number') {
|
|
456
|
-
throw new TypeError('missing params.maxMessageSize');
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
exports.validateSctpParameters = validateSctpParameters;
|
|
460
|
-
/**
|
|
461
|
-
* Validates SctpStreamParameters. It may modify given data by adding missing
|
|
462
|
-
* fields with default values.
|
|
463
|
-
* It throws if invalid.
|
|
464
|
-
*/
|
|
465
|
-
function validateSctpStreamParameters(params) {
|
|
466
|
-
if (typeof params !== 'object') {
|
|
467
|
-
throw new TypeError('params is not an object');
|
|
468
|
-
}
|
|
469
|
-
// streamId is mandatory.
|
|
470
|
-
if (typeof params.streamId !== 'number') {
|
|
471
|
-
throw new TypeError('missing params.streamId');
|
|
472
|
-
}
|
|
473
|
-
// ordered is optional.
|
|
474
|
-
let orderedGiven = false;
|
|
475
|
-
if (typeof params.ordered === 'boolean') {
|
|
476
|
-
orderedGiven = true;
|
|
477
|
-
}
|
|
478
|
-
else {
|
|
479
|
-
params.ordered = true;
|
|
480
|
-
}
|
|
481
|
-
// maxPacketLifeTime is optional.
|
|
482
|
-
if (params.maxPacketLifeTime &&
|
|
483
|
-
typeof params.maxPacketLifeTime !== 'number') {
|
|
484
|
-
throw new TypeError('invalid params.maxPacketLifeTime');
|
|
485
|
-
}
|
|
486
|
-
// maxRetransmits is optional.
|
|
487
|
-
if (params.maxRetransmits && typeof params.maxRetransmits !== 'number') {
|
|
488
|
-
throw new TypeError('invalid params.maxRetransmits');
|
|
489
|
-
}
|
|
490
|
-
if (params.maxPacketLifeTime && params.maxRetransmits) {
|
|
491
|
-
throw new TypeError('cannot provide both maxPacketLifeTime and maxRetransmits');
|
|
492
|
-
}
|
|
493
|
-
if (orderedGiven &&
|
|
494
|
-
params.ordered &&
|
|
495
|
-
(params.maxPacketLifeTime || params.maxRetransmits)) {
|
|
496
|
-
throw new TypeError('cannot be ordered with maxPacketLifeTime or maxRetransmits');
|
|
497
|
-
}
|
|
498
|
-
else if (!orderedGiven &&
|
|
499
|
-
(params.maxPacketLifeTime || params.maxRetransmits)) {
|
|
500
|
-
params.ordered = false;
|
|
501
|
-
}
|
|
502
|
-
// label is optional.
|
|
503
|
-
if (params.label && typeof params.label !== 'string') {
|
|
504
|
-
throw new TypeError('invalid params.label');
|
|
505
|
-
}
|
|
506
|
-
// protocol is optional.
|
|
507
|
-
if (params.protocol && typeof params.protocol !== 'string') {
|
|
508
|
-
throw new TypeError('invalid params.protocol');
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
exports.validateSctpStreamParameters = validateSctpStreamParameters;
|
|
512
|
-
/**
|
|
513
|
-
* Generate extended RTP capabilities for sending and receiving.
|
|
182
|
+
* Generate extended RTP capabilities for sending and receiving.
|
|
514
183
|
*/
|
|
515
184
|
function getExtendedRtpCapabilities(localCaps, remoteCaps) {
|
|
516
185
|
const extendedRtpCapabilities = {
|
|
@@ -763,8 +432,7 @@ function getSendingRemoteRtpParameters(kind, extendedRtpCapabilities) {
|
|
|
763
432
|
codec.rtcpFeedback = (codec.rtcpFeedback || []).filter((fb) => fb.type !== 'goog-remb');
|
|
764
433
|
}
|
|
765
434
|
}
|
|
766
|
-
else if (rtpParameters.headerExtensions.some(ext => ext.uri ===
|
|
767
|
-
'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time')) {
|
|
435
|
+
else if (rtpParameters.headerExtensions.some(ext => ext.uri === 'http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time')) {
|
|
768
436
|
for (const codec of rtpParameters.codecs) {
|
|
769
437
|
codec.rtcpFeedback = (codec.rtcpFeedback || []).filter(fb => fb.type !== 'transport-cc');
|
|
770
438
|
}
|
|
@@ -856,6 +524,302 @@ function canReceive(rtpParameters, extendedRtpCapabilities) {
|
|
|
856
524
|
return extendedRtpCapabilities.codecs.some((codec) => codec.remotePayloadType === firstMediaCodec.payloadType);
|
|
857
525
|
}
|
|
858
526
|
exports.canReceive = canReceive;
|
|
527
|
+
/**
|
|
528
|
+
* Validates RtpCodecCapability. It may modify given data by adding missing
|
|
529
|
+
* fields with default values.
|
|
530
|
+
* It throws if invalid.
|
|
531
|
+
*/
|
|
532
|
+
function validateRtpCodecCapability(codec) {
|
|
533
|
+
const MimeTypeRegex = new RegExp('^(audio|video)/(.+)', 'i');
|
|
534
|
+
if (typeof codec !== 'object') {
|
|
535
|
+
throw new TypeError('codec is not an object');
|
|
536
|
+
}
|
|
537
|
+
// mimeType is mandatory.
|
|
538
|
+
if (!codec.mimeType || typeof codec.mimeType !== 'string') {
|
|
539
|
+
throw new TypeError('missing codec.mimeType');
|
|
540
|
+
}
|
|
541
|
+
const mimeTypeMatch = MimeTypeRegex.exec(codec.mimeType);
|
|
542
|
+
if (!mimeTypeMatch) {
|
|
543
|
+
throw new TypeError('invalid codec.mimeType');
|
|
544
|
+
}
|
|
545
|
+
// Just override kind with media component of mimeType.
|
|
546
|
+
codec.kind = mimeTypeMatch[1].toLowerCase();
|
|
547
|
+
// preferredPayloadType is optional.
|
|
548
|
+
if (codec.preferredPayloadType &&
|
|
549
|
+
typeof codec.preferredPayloadType !== 'number') {
|
|
550
|
+
throw new TypeError('invalid codec.preferredPayloadType');
|
|
551
|
+
}
|
|
552
|
+
// clockRate is mandatory.
|
|
553
|
+
if (typeof codec.clockRate !== 'number') {
|
|
554
|
+
throw new TypeError('missing codec.clockRate');
|
|
555
|
+
}
|
|
556
|
+
// channels is optional. If unset, set it to 1 (just if audio).
|
|
557
|
+
if (codec.kind === 'audio') {
|
|
558
|
+
if (typeof codec.channels !== 'number') {
|
|
559
|
+
codec.channels = 1;
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
else {
|
|
563
|
+
delete codec.channels;
|
|
564
|
+
}
|
|
565
|
+
// parameters is optional. If unset, set it to an empty object.
|
|
566
|
+
if (!codec.parameters || typeof codec.parameters !== 'object') {
|
|
567
|
+
codec.parameters = {};
|
|
568
|
+
}
|
|
569
|
+
for (const key of Object.keys(codec.parameters)) {
|
|
570
|
+
let value = codec.parameters[key];
|
|
571
|
+
if (value === undefined) {
|
|
572
|
+
codec.parameters[key] = '';
|
|
573
|
+
value = '';
|
|
574
|
+
}
|
|
575
|
+
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
576
|
+
throw new TypeError(`invalid codec parameter [key:${key}s, value:${value}]`);
|
|
577
|
+
}
|
|
578
|
+
// Specific parameters validation.
|
|
579
|
+
if (key === 'apt') {
|
|
580
|
+
if (typeof value !== 'number') {
|
|
581
|
+
throw new TypeError('invalid codec apt parameter');
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
// rtcpFeedback is optional. If unset, set it to an empty array.
|
|
586
|
+
if (!codec.rtcpFeedback || !Array.isArray(codec.rtcpFeedback)) {
|
|
587
|
+
codec.rtcpFeedback = [];
|
|
588
|
+
}
|
|
589
|
+
for (const fb of codec.rtcpFeedback) {
|
|
590
|
+
validateRtcpFeedback(fb);
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
/**
|
|
594
|
+
* Validates RtcpFeedback. It may modify given data by adding missing
|
|
595
|
+
* fields with default values.
|
|
596
|
+
* It throws if invalid.
|
|
597
|
+
*/
|
|
598
|
+
function validateRtcpFeedback(fb) {
|
|
599
|
+
if (typeof fb !== 'object') {
|
|
600
|
+
throw new TypeError('fb is not an object');
|
|
601
|
+
}
|
|
602
|
+
// type is mandatory.
|
|
603
|
+
if (!fb.type || typeof fb.type !== 'string') {
|
|
604
|
+
throw new TypeError('missing fb.type');
|
|
605
|
+
}
|
|
606
|
+
// parameter is optional. If unset set it to an empty string.
|
|
607
|
+
if (!fb.parameter || typeof fb.parameter !== 'string') {
|
|
608
|
+
fb.parameter = '';
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Validates RtpHeaderExtension. It may modify given data by adding missing
|
|
613
|
+
* fields with default values.
|
|
614
|
+
* It throws if invalid.
|
|
615
|
+
*/
|
|
616
|
+
function validateRtpHeaderExtension(ext) {
|
|
617
|
+
if (typeof ext !== 'object') {
|
|
618
|
+
throw new TypeError('ext is not an object');
|
|
619
|
+
}
|
|
620
|
+
// kind is mandatory.
|
|
621
|
+
if (ext.kind !== 'audio' && ext.kind !== 'video') {
|
|
622
|
+
throw new TypeError('invalid ext.kind');
|
|
623
|
+
}
|
|
624
|
+
// uri is mandatory.
|
|
625
|
+
if (!ext.uri || typeof ext.uri !== 'string') {
|
|
626
|
+
throw new TypeError('missing ext.uri');
|
|
627
|
+
}
|
|
628
|
+
// preferredId is mandatory.
|
|
629
|
+
if (typeof ext.preferredId !== 'number') {
|
|
630
|
+
throw new TypeError('missing ext.preferredId');
|
|
631
|
+
}
|
|
632
|
+
// preferredEncrypt is optional. If unset set it to false.
|
|
633
|
+
if (ext.preferredEncrypt && typeof ext.preferredEncrypt !== 'boolean') {
|
|
634
|
+
throw new TypeError('invalid ext.preferredEncrypt');
|
|
635
|
+
}
|
|
636
|
+
else if (!ext.preferredEncrypt) {
|
|
637
|
+
ext.preferredEncrypt = false;
|
|
638
|
+
}
|
|
639
|
+
// direction is optional. If unset set it to sendrecv.
|
|
640
|
+
if (ext.direction && typeof ext.direction !== 'string') {
|
|
641
|
+
throw new TypeError('invalid ext.direction');
|
|
642
|
+
}
|
|
643
|
+
else if (!ext.direction) {
|
|
644
|
+
ext.direction = 'sendrecv';
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Validates RtpCodecParameters. It may modify given data by adding missing
|
|
649
|
+
* fields with default values.
|
|
650
|
+
* It throws if invalid.
|
|
651
|
+
*/
|
|
652
|
+
function validateRtpCodecParameters(codec) {
|
|
653
|
+
const MimeTypeRegex = new RegExp('^(audio|video)/(.+)', 'i');
|
|
654
|
+
if (typeof codec !== 'object') {
|
|
655
|
+
throw new TypeError('codec is not an object');
|
|
656
|
+
}
|
|
657
|
+
// mimeType is mandatory.
|
|
658
|
+
if (!codec.mimeType || typeof codec.mimeType !== 'string') {
|
|
659
|
+
throw new TypeError('missing codec.mimeType');
|
|
660
|
+
}
|
|
661
|
+
const mimeTypeMatch = MimeTypeRegex.exec(codec.mimeType);
|
|
662
|
+
if (!mimeTypeMatch) {
|
|
663
|
+
throw new TypeError('invalid codec.mimeType');
|
|
664
|
+
}
|
|
665
|
+
// payloadType is mandatory.
|
|
666
|
+
if (typeof codec.payloadType !== 'number') {
|
|
667
|
+
throw new TypeError('missing codec.payloadType');
|
|
668
|
+
}
|
|
669
|
+
// clockRate is mandatory.
|
|
670
|
+
if (typeof codec.clockRate !== 'number') {
|
|
671
|
+
throw new TypeError('missing codec.clockRate');
|
|
672
|
+
}
|
|
673
|
+
const kind = mimeTypeMatch[1].toLowerCase();
|
|
674
|
+
// channels is optional. If unset, set it to 1 (just if audio).
|
|
675
|
+
if (kind === 'audio') {
|
|
676
|
+
if (typeof codec.channels !== 'number') {
|
|
677
|
+
codec.channels = 1;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
else {
|
|
681
|
+
delete codec.channels;
|
|
682
|
+
}
|
|
683
|
+
// parameters is optional. If unset, set it to an empty object.
|
|
684
|
+
if (!codec.parameters || typeof codec.parameters !== 'object') {
|
|
685
|
+
codec.parameters = {};
|
|
686
|
+
}
|
|
687
|
+
for (const key of Object.keys(codec.parameters)) {
|
|
688
|
+
let value = codec.parameters[key];
|
|
689
|
+
if (value === undefined) {
|
|
690
|
+
codec.parameters[key] = '';
|
|
691
|
+
value = '';
|
|
692
|
+
}
|
|
693
|
+
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
694
|
+
throw new TypeError(`invalid codec parameter [key:${key}s, value:${value}]`);
|
|
695
|
+
}
|
|
696
|
+
// Specific parameters validation.
|
|
697
|
+
if (key === 'apt') {
|
|
698
|
+
if (typeof value !== 'number') {
|
|
699
|
+
throw new TypeError('invalid codec apt parameter');
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
// rtcpFeedback is optional. If unset, set it to an empty array.
|
|
704
|
+
if (!codec.rtcpFeedback || !Array.isArray(codec.rtcpFeedback)) {
|
|
705
|
+
codec.rtcpFeedback = [];
|
|
706
|
+
}
|
|
707
|
+
for (const fb of codec.rtcpFeedback) {
|
|
708
|
+
validateRtcpFeedback(fb);
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
/**
|
|
712
|
+
* Validates RtpHeaderExtensionParameteters. It may modify given data by adding missing
|
|
713
|
+
* fields with default values.
|
|
714
|
+
* It throws if invalid.
|
|
715
|
+
*/
|
|
716
|
+
function validateRtpHeaderExtensionParameters(ext) {
|
|
717
|
+
if (typeof ext !== 'object') {
|
|
718
|
+
throw new TypeError('ext is not an object');
|
|
719
|
+
}
|
|
720
|
+
// uri is mandatory.
|
|
721
|
+
if (!ext.uri || typeof ext.uri !== 'string') {
|
|
722
|
+
throw new TypeError('missing ext.uri');
|
|
723
|
+
}
|
|
724
|
+
// id is mandatory.
|
|
725
|
+
if (typeof ext.id !== 'number') {
|
|
726
|
+
throw new TypeError('missing ext.id');
|
|
727
|
+
}
|
|
728
|
+
// encrypt is optional. If unset set it to false.
|
|
729
|
+
if (ext.encrypt && typeof ext.encrypt !== 'boolean') {
|
|
730
|
+
throw new TypeError('invalid ext.encrypt');
|
|
731
|
+
}
|
|
732
|
+
else if (!ext.encrypt) {
|
|
733
|
+
ext.encrypt = false;
|
|
734
|
+
}
|
|
735
|
+
// parameters is optional. If unset, set it to an empty object.
|
|
736
|
+
if (!ext.parameters || typeof ext.parameters !== 'object') {
|
|
737
|
+
ext.parameters = {};
|
|
738
|
+
}
|
|
739
|
+
for (const key of Object.keys(ext.parameters)) {
|
|
740
|
+
let value = ext.parameters[key];
|
|
741
|
+
if (value === undefined) {
|
|
742
|
+
ext.parameters[key] = '';
|
|
743
|
+
value = '';
|
|
744
|
+
}
|
|
745
|
+
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
746
|
+
throw new TypeError('invalid header extension parameter');
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Validates RtpEncodingParameters. It may modify given data by adding missing
|
|
752
|
+
* fields with default values.
|
|
753
|
+
* It throws if invalid.
|
|
754
|
+
*/
|
|
755
|
+
function validateRtpEncodingParameters(encoding) {
|
|
756
|
+
if (typeof encoding !== 'object') {
|
|
757
|
+
throw new TypeError('encoding is not an object');
|
|
758
|
+
}
|
|
759
|
+
// ssrc is optional.
|
|
760
|
+
if (encoding.ssrc && typeof encoding.ssrc !== 'number') {
|
|
761
|
+
throw new TypeError('invalid encoding.ssrc');
|
|
762
|
+
}
|
|
763
|
+
// rid is optional.
|
|
764
|
+
if (encoding.rid && typeof encoding.rid !== 'string') {
|
|
765
|
+
throw new TypeError('invalid encoding.rid');
|
|
766
|
+
}
|
|
767
|
+
// rtx is optional.
|
|
768
|
+
if (encoding.rtx && typeof encoding.rtx !== 'object') {
|
|
769
|
+
throw new TypeError('invalid encoding.rtx');
|
|
770
|
+
}
|
|
771
|
+
else if (encoding.rtx) {
|
|
772
|
+
// RTX ssrc is mandatory if rtx is present.
|
|
773
|
+
if (typeof encoding.rtx.ssrc !== 'number') {
|
|
774
|
+
throw new TypeError('missing encoding.rtx.ssrc');
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
// dtx is optional. If unset set it to false.
|
|
778
|
+
if (!encoding.dtx || typeof encoding.dtx !== 'boolean') {
|
|
779
|
+
encoding.dtx = false;
|
|
780
|
+
}
|
|
781
|
+
// scalabilityMode is optional.
|
|
782
|
+
if (encoding.scalabilityMode &&
|
|
783
|
+
typeof encoding.scalabilityMode !== 'string') {
|
|
784
|
+
throw new TypeError('invalid encoding.scalabilityMode');
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Validates RtcpParameters. It may modify given data by adding missing
|
|
789
|
+
* fields with default values.
|
|
790
|
+
* It throws if invalid.
|
|
791
|
+
*/
|
|
792
|
+
function validateRtcpParameters(rtcp) {
|
|
793
|
+
if (typeof rtcp !== 'object') {
|
|
794
|
+
throw new TypeError('rtcp is not an object');
|
|
795
|
+
}
|
|
796
|
+
// cname is optional.
|
|
797
|
+
if (rtcp.cname && typeof rtcp.cname !== 'string') {
|
|
798
|
+
throw new TypeError('invalid rtcp.cname');
|
|
799
|
+
}
|
|
800
|
+
// reducedSize is optional. If unset set it to true.
|
|
801
|
+
if (!rtcp.reducedSize || typeof rtcp.reducedSize !== 'boolean') {
|
|
802
|
+
rtcp.reducedSize = true;
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
/**
|
|
806
|
+
* Validates NumSctpStreams. It may modify given data by adding missing
|
|
807
|
+
* fields with default values.
|
|
808
|
+
* It throws if invalid.
|
|
809
|
+
*/
|
|
810
|
+
function validateNumSctpStreams(numStreams) {
|
|
811
|
+
if (typeof numStreams !== 'object') {
|
|
812
|
+
throw new TypeError('numStreams is not an object');
|
|
813
|
+
}
|
|
814
|
+
// OS is mandatory.
|
|
815
|
+
if (typeof numStreams.OS !== 'number') {
|
|
816
|
+
throw new TypeError('missing numStreams.OS');
|
|
817
|
+
}
|
|
818
|
+
// MIS is mandatory.
|
|
819
|
+
if (typeof numStreams.MIS !== 'number') {
|
|
820
|
+
throw new TypeError('missing numStreams.MIS');
|
|
821
|
+
}
|
|
822
|
+
}
|
|
859
823
|
function isRtxCodec(codec) {
|
|
860
824
|
if (!codec) {
|
|
861
825
|
return false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fakeParameters.d.ts","sourceRoot":"","sources":["../../src/test/fakeParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,KAAK,CAAC;AAOvC,wBAAgB,6BAA6B,IAAI,eAAe,CAAC,KAAK,CAAC,eAAe,CAoKrF;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAAC,KAAK,CAAC,eAAe,CAoHrF;AAED,wBAAgB,8BAA8B,IAAI,eAAe,CAAC,KAAK,CAAC,gBAAgB,CAIvF;AAED,wBAAgB,2BAA2B,IAAI,eAAe,CAAC,KAAK,CAAC,cAAc,CAWlF;AAED,wBAAgB,iCAAiC,IAAI,eAAe,CAAC,KAAK,CAAC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"fakeParameters.d.ts","sourceRoot":"","sources":["../../src/test/fakeParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,KAAK,CAAC;AAOvC,wBAAgB,6BAA6B,IAAI,eAAe,CAAC,KAAK,CAAC,eAAe,CAoKrF;AAED,wBAAgB,6BAA6B,IAAI,eAAe,CAAC,KAAK,CAAC,eAAe,CAoHrF;AAED,wBAAgB,8BAA8B,IAAI,eAAe,CAAC,KAAK,CAAC,gBAAgB,CAIvF;AAED,wBAAgB,2BAA2B,IAAI,eAAe,CAAC,KAAK,CAAC,cAAc,CAWlF;AAED,wBAAgB,iCAAiC,IAAI,eAAe,CAAC,KAAK,CAAC,gBAAgB,CAyD1F;AAED,wBAAgB,gCAAgC,IAAI;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAIjE;AAED,wBAAgB,gCAAgC,CAAC,EAChD,EAAE,EACF,aAAa,GACb,GAAE;IACF,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;CAClB,GAAG,eAAe,CAAC,KAAK,CAAC,eAAe,CA6O7C;AAED,wBAAgB,oCAAoC,IAAI;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAIrE;AAED,wBAAgB,oCAAoC,CAAC,EACpD,EAAE,GACF,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAO,GAAG,eAAe,CAAC,KAAK,CAAC,mBAAmB,CAUlE"}
|
|
@@ -341,6 +341,7 @@ function generateTransportRemoteParameters() {
|
|
|
341
341
|
iceCandidates: [
|
|
342
342
|
{
|
|
343
343
|
foundation: 'udpcandidate',
|
|
344
|
+
address: '9.9.9.9',
|
|
344
345
|
ip: '9.9.9.9',
|
|
345
346
|
port: 40533,
|
|
346
347
|
priority: 1078862079,
|
|
@@ -350,6 +351,7 @@ function generateTransportRemoteParameters() {
|
|
|
350
351
|
},
|
|
351
352
|
{
|
|
352
353
|
foundation: 'udpcandidate',
|
|
354
|
+
address: '9.9.9.9',
|
|
353
355
|
ip: '9:9:9:9:9:9',
|
|
354
356
|
port: 41333,
|
|
355
357
|
priority: 1078862089,
|
package/lib/test/test.js
CHANGED
|
@@ -307,7 +307,8 @@ test('transport.produce() succeeds', async () => {
|
|
|
307
307
|
stopTracks: false,
|
|
308
308
|
appData: { foo: 'FOO' },
|
|
309
309
|
});
|
|
310
|
-
// 'connect' event should not have been called since it was in beforeEach
|
|
310
|
+
// 'connect' event should not have been called since it was in beforeEach
|
|
311
|
+
// already.
|
|
311
312
|
expect(connectEventNumTimesCalled).toBe(0);
|
|
312
313
|
expect(produceEventNumTimesCalled).toBe(1);
|
|
313
314
|
expect(typeof audioProducer).toBe('object');
|
|
@@ -360,7 +361,7 @@ test('transport.produce() succeeds', async () => {
|
|
|
360
361
|
// Reset the audio paused state.
|
|
361
362
|
audioProducer.resume();
|
|
362
363
|
const videoEncodings = [{ maxBitrate: 100000 }, { maxBitrate: 500000 }];
|
|
363
|
-
// Note that stopTracks is not
|
|
364
|
+
// Note that stopTracks is not given so it's true by default.
|
|
364
365
|
// Use disableTrackOnPause: false and zeroRtpOnPause: true
|
|
365
366
|
const videoProducer = await ctx.connectedSendTransport.produce({
|
|
366
367
|
track: videoTrack,
|
|
@@ -494,7 +495,8 @@ test('transport.consume() succeeds', async () => {
|
|
|
494
495
|
rtpParameters: audioConsumerRemoteParameters.rtpParameters,
|
|
495
496
|
appData: { bar: 'BAR' },
|
|
496
497
|
});
|
|
497
|
-
// 'connect' event should not have been called since it was in beforeEach
|
|
498
|
+
// 'connect' event should not have been called since it was in beforeEach
|
|
499
|
+
// already.
|
|
498
500
|
expect(connectEventNumTimesCalled).toBe(0);
|
|
499
501
|
expect(typeof audioConsumer).toBe('object');
|
|
500
502
|
expect(audioConsumer.id).toBe(audioConsumerRemoteParameters.id);
|
package/npm-scripts.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import process from 'process';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import fs from 'fs';
|
|
5
|
-
import { execSync } from 'child_process';
|
|
1
|
+
import * as process from 'node:process';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import * as os from 'node:os';
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import { execSync } from 'node:child_process';
|
|
6
6
|
|
|
7
7
|
const PKG = JSON.parse(fs.readFileSync('./package.json').toString());
|
|
8
8
|
const IS_WINDOWS = os.platform() === 'win32';
|
|
@@ -154,9 +154,7 @@ function lint() {
|
|
|
154
154
|
// rules.
|
|
155
155
|
executeCmd('eslint-config-prettier .eslintrc.js');
|
|
156
156
|
|
|
157
|
-
executeCmd(
|
|
158
|
-
'eslint -c .eslintrc.js --ignore-path .eslintignore --max-warnings 0 .',
|
|
159
|
-
);
|
|
157
|
+
executeCmd('eslint -c .eslintrc.js --max-warnings 0 .');
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
function format() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup-client",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.4",
|
|
4
4
|
"description": "mediasoup client side TypeScript library",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"homepage": "https://mediasoup.org",
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/versatica/mediasoup-client.git"
|
|
13
|
+
"url": "git+https://github.com/versatica/mediasoup-client.git"
|
|
14
14
|
},
|
|
15
15
|
"funding": {
|
|
16
16
|
"type": "opencollective",
|
|
@@ -71,25 +71,25 @@
|
|
|
71
71
|
"fake-mediastreamtrack": "^1.2.0",
|
|
72
72
|
"h264-profile-level-id": "^2.0.0",
|
|
73
73
|
"queue-microtask": "^1.2.3",
|
|
74
|
-
"sdp-transform": "^2.14.
|
|
74
|
+
"sdp-transform": "^2.14.2",
|
|
75
75
|
"supports-color": "^9.4.0",
|
|
76
76
|
"ua-parser-js": "^1.0.37"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/events": "^3.0.3",
|
|
80
|
-
"@types/jest": "^29.5.
|
|
80
|
+
"@types/jest": "^29.5.12",
|
|
81
81
|
"@types/sdp-transform": "^2.4.9",
|
|
82
82
|
"@types/ua-parser-js": "^0.7.39",
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
84
|
-
"@typescript-eslint/parser": "^
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
84
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
85
85
|
"eslint": "^8.56.0",
|
|
86
86
|
"eslint-config-prettier": "^9.1.0",
|
|
87
|
-
"eslint-plugin-jest": "^27.
|
|
88
|
-
"eslint-plugin-prettier": "^5.1.
|
|
87
|
+
"eslint-plugin-jest": "^27.8.0",
|
|
88
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
89
89
|
"jest": "^29.7.0",
|
|
90
|
-
"open-cli": "^
|
|
91
|
-
"prettier": "^3.
|
|
92
|
-
"ts-jest": "^29.1.
|
|
90
|
+
"open-cli": "^8.0.0",
|
|
91
|
+
"prettier": "^3.2.5",
|
|
92
|
+
"ts-jest": "^29.1.2",
|
|
93
93
|
"typescript": "^5.3.3"
|
|
94
94
|
}
|
|
95
95
|
}
|