mediasoup-client 3.6.78 → 3.6.80
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/lib/Device.d.ts +1 -1
- package/lib/Device.d.ts.map +1 -1
- package/lib/Device.js +13 -3
- package/lib/handlers/Chrome111.d.ts +49 -0
- package/lib/handlers/Chrome111.d.ts.map +1 -0
- package/lib/handlers/Chrome111.js +640 -0
- package/lib/handlers/Chrome55.js +1 -1
- package/lib/handlers/Chrome67.js +1 -1
- package/lib/handlers/Chrome70.js +1 -1
- package/lib/handlers/Chrome74.d.ts.map +1 -1
- package/lib/handlers/Chrome74.js +2 -4
- package/lib/handlers/Firefox60.d.ts.map +1 -1
- package/lib/handlers/Firefox60.js +2 -3
- package/lib/handlers/ReactNative.js +1 -1
- package/lib/handlers/ReactNativeUnifiedPlan.d.ts.map +1 -1
- package/lib/handlers/ReactNativeUnifiedPlan.js +6 -1
- package/lib/handlers/Safari11.js +1 -1
- package/lib/handlers/Safari12.d.ts.map +1 -1
- package/lib/handlers/Safari12.js +2 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +2 -2
package/lib/Device.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Transport, TransportOptions } from './Transport';
|
|
|
3
3
|
import { HandlerFactory } from './handlers/HandlerInterface';
|
|
4
4
|
import { RtpCapabilities, MediaKind } from './RtpParameters';
|
|
5
5
|
import { SctpCapabilities } from './SctpParameters';
|
|
6
|
-
export type BuiltinHandlerName = 'Chrome74' | 'Chrome70' | 'Chrome67' | 'Chrome55' | 'Firefox60' | 'Safari12' | 'Safari11' | 'Edge11' | 'ReactNativeUnifiedPlan' | 'ReactNative';
|
|
6
|
+
export type BuiltinHandlerName = 'Chrome111' | 'Chrome74' | 'Chrome70' | 'Chrome67' | 'Chrome55' | 'Firefox60' | 'Safari12' | 'Safari11' | 'Edge11' | 'ReactNativeUnifiedPlan' | 'ReactNative';
|
|
7
7
|
export type DeviceOptions = {
|
|
8
8
|
/**
|
|
9
9
|
* The name of one of the builtin handlers.
|
package/lib/Device.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../src/Device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAoB,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../src/Device.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAI9D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAoB,MAAM,6BAA6B,CAAC;AAY/E,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIpD,MAAM,MAAM,kBAAkB,GAC3B,WAAW,GACX,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,GACX,UAAU,GACV,UAAU,GACV,QAAQ,GACR,wBAAwB,GACxB,aAAa,CAAC;AAEjB,MAAM,MAAM,aAAa,GACzB;IACC;;OAEG;IACH,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;OAEG;IACH,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAOF,wBAAgB,YAAY,IAAI,kBAAkB,GAAG,SAAS,CA4I7D;AAED,MAAM,MAAM,oBAAoB,GAChC;IACC,YAAY,EAAE,CAAC,SAAS,CAAC,CAAC;CAC1B,CAAC;AAEF,qBAAa,MAAM;IAGlB,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CAAC,eAAe;CAuDvB"}
|
package/lib/Device.js
CHANGED
|
@@ -34,6 +34,7 @@ const errors_1 = require("./errors");
|
|
|
34
34
|
const utils = __importStar(require("./utils"));
|
|
35
35
|
const ortc = __importStar(require("./ortc"));
|
|
36
36
|
const Transport_1 = require("./Transport");
|
|
37
|
+
const Chrome111_1 = require("./handlers/Chrome111");
|
|
37
38
|
const Chrome74_1 = require("./handlers/Chrome74");
|
|
38
39
|
const Chrome70_1 = require("./handlers/Chrome70");
|
|
39
40
|
const Chrome67_1 = require("./handlers/Chrome67");
|
|
@@ -69,7 +70,10 @@ function detectDevice() {
|
|
|
69
70
|
const browser = bowser_1.default.getParser(ua);
|
|
70
71
|
const engine = browser.getEngine();
|
|
71
72
|
// Chrome, Chromium, and Edge.
|
|
72
|
-
if (browser.satisfies({ chrome: '>=
|
|
73
|
+
if (browser.satisfies({ chrome: '>=111', chromium: '>=111', 'microsoft edge': '>=111' })) {
|
|
74
|
+
return 'Chrome111';
|
|
75
|
+
}
|
|
76
|
+
else if (browser.satisfies({ chrome: '>=74', chromium: '>=74', 'microsoft edge': '>=88' })) {
|
|
73
77
|
return 'Chrome74';
|
|
74
78
|
}
|
|
75
79
|
else if (browser.satisfies({ chrome: '>=70', chromium: '>=70' })) {
|
|
@@ -109,7 +113,10 @@ function detectDevice() {
|
|
|
109
113
|
const match = ua.match(/(?:(?:Chrome|Chromium))[ /](\w+)/i);
|
|
110
114
|
if (match) {
|
|
111
115
|
const version = Number(match[1]);
|
|
112
|
-
if (version >=
|
|
116
|
+
if (version >= 111) {
|
|
117
|
+
return 'Chrome111';
|
|
118
|
+
}
|
|
119
|
+
else if (version >= 74) {
|
|
113
120
|
return 'Chrome74';
|
|
114
121
|
}
|
|
115
122
|
else if (version >= 70) {
|
|
@@ -123,7 +130,7 @@ function detectDevice() {
|
|
|
123
130
|
}
|
|
124
131
|
}
|
|
125
132
|
else {
|
|
126
|
-
return '
|
|
133
|
+
return 'Chrome111';
|
|
127
134
|
}
|
|
128
135
|
}
|
|
129
136
|
// Unsupported browser.
|
|
@@ -181,6 +188,9 @@ class Device {
|
|
|
181
188
|
}
|
|
182
189
|
}
|
|
183
190
|
switch (handlerName) {
|
|
191
|
+
case 'Chrome111':
|
|
192
|
+
this._handlerFactory = Chrome111_1.Chrome111.createFactory();
|
|
193
|
+
break;
|
|
184
194
|
case 'Chrome74':
|
|
185
195
|
this._handlerFactory = Chrome74_1.Chrome74.createFactory();
|
|
186
196
|
break;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { HandlerFactory, HandlerInterface, HandlerRunOptions, HandlerSendOptions, HandlerSendResult, HandlerReceiveOptions, HandlerReceiveResult, HandlerSendDataChannelOptions, HandlerSendDataChannelResult, HandlerReceiveDataChannelOptions, HandlerReceiveDataChannelResult } from './HandlerInterface';
|
|
2
|
+
import { IceParameters } from '../Transport';
|
|
3
|
+
import { RtpCapabilities } from '../RtpParameters';
|
|
4
|
+
import { SctpCapabilities } from '../SctpParameters';
|
|
5
|
+
export declare class Chrome111 extends HandlerInterface {
|
|
6
|
+
private _direction?;
|
|
7
|
+
private _remoteSdp?;
|
|
8
|
+
private _sendingRtpParametersByKind?;
|
|
9
|
+
private _sendingRemoteRtpParametersByKind?;
|
|
10
|
+
private _forcedLocalDtlsRole?;
|
|
11
|
+
private _pc;
|
|
12
|
+
private readonly _mapMidTransceiver;
|
|
13
|
+
private readonly _sendStream;
|
|
14
|
+
private _hasDataChannelMediaSection;
|
|
15
|
+
private _nextSendSctpStreamId;
|
|
16
|
+
private _transportReady;
|
|
17
|
+
/**
|
|
18
|
+
* Creates a factory function.
|
|
19
|
+
*/
|
|
20
|
+
static createFactory(): HandlerFactory;
|
|
21
|
+
constructor();
|
|
22
|
+
get name(): string;
|
|
23
|
+
close(): void;
|
|
24
|
+
getNativeRtpCapabilities(): Promise<RtpCapabilities>;
|
|
25
|
+
getNativeSctpCapabilities(): Promise<SctpCapabilities>;
|
|
26
|
+
run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }: HandlerRunOptions): void;
|
|
27
|
+
updateIceServers(iceServers: RTCIceServer[]): Promise<void>;
|
|
28
|
+
restartIce(iceParameters: IceParameters): Promise<void>;
|
|
29
|
+
getTransportStats(): Promise<RTCStatsReport>;
|
|
30
|
+
send({ track, encodings, codecOptions, codec }: HandlerSendOptions): Promise<HandlerSendResult>;
|
|
31
|
+
stopSending(localId: string): Promise<void>;
|
|
32
|
+
pauseSending(localId: string): Promise<void>;
|
|
33
|
+
resumeSending(localId: string): Promise<void>;
|
|
34
|
+
replaceTrack(localId: string, track: MediaStreamTrack | null): Promise<void>;
|
|
35
|
+
setMaxSpatialLayer(localId: string, spatialLayer: number): Promise<void>;
|
|
36
|
+
setRtpEncodingParameters(localId: string, params: any): Promise<void>;
|
|
37
|
+
getSenderStats(localId: string): Promise<RTCStatsReport>;
|
|
38
|
+
sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }: HandlerSendDataChannelOptions): Promise<HandlerSendDataChannelResult>;
|
|
39
|
+
receive(optionsList: HandlerReceiveOptions[]): Promise<HandlerReceiveResult[]>;
|
|
40
|
+
stopReceiving(localIds: string[]): Promise<void>;
|
|
41
|
+
pauseReceiving(localIds: string[]): Promise<void>;
|
|
42
|
+
resumeReceiving(localIds: string[]): Promise<void>;
|
|
43
|
+
getReceiverStats(localId: string): Promise<RTCStatsReport>;
|
|
44
|
+
receiveDataChannel({ sctpStreamParameters, label, protocol }: HandlerReceiveDataChannelOptions): Promise<HandlerReceiveDataChannelResult>;
|
|
45
|
+
private setupTransport;
|
|
46
|
+
private assertSendDirection;
|
|
47
|
+
private assertRecvDirection;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=Chrome111.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chrome111.d.ts","sourceRoot":"","sources":["../../src/handlers/Chrome111.ts"],"names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,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkClD,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAY1D,kBAAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAgE7B,cAAc;IAuC5B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;CAQ3B"}
|
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Chrome111 = void 0;
|
|
27
|
+
const sdpTransform = __importStar(require("sdp-transform"));
|
|
28
|
+
const Logger_1 = require("../Logger");
|
|
29
|
+
const utils = __importStar(require("../utils"));
|
|
30
|
+
const ortc = __importStar(require("../ortc"));
|
|
31
|
+
const sdpCommonUtils = __importStar(require("./sdp/commonUtils"));
|
|
32
|
+
const sdpUnifiedPlanUtils = __importStar(require("./sdp/unifiedPlanUtils"));
|
|
33
|
+
const HandlerInterface_1 = require("./HandlerInterface");
|
|
34
|
+
const RemoteSdp_1 = require("./sdp/RemoteSdp");
|
|
35
|
+
const scalabilityModes_1 = require("../scalabilityModes");
|
|
36
|
+
const logger = new Logger_1.Logger('Chrome111');
|
|
37
|
+
const SCTP_NUM_STREAMS = { OS: 1024, MIS: 1024 };
|
|
38
|
+
class Chrome111 extends HandlerInterface_1.HandlerInterface {
|
|
39
|
+
/**
|
|
40
|
+
* Creates a factory function.
|
|
41
|
+
*/
|
|
42
|
+
static createFactory() {
|
|
43
|
+
return () => new Chrome111();
|
|
44
|
+
}
|
|
45
|
+
constructor() {
|
|
46
|
+
super();
|
|
47
|
+
// Map of RTCTransceivers indexed by MID.
|
|
48
|
+
this._mapMidTransceiver = new Map();
|
|
49
|
+
// Local stream for sending.
|
|
50
|
+
this._sendStream = new MediaStream();
|
|
51
|
+
// Whether a DataChannel m=application section has been created.
|
|
52
|
+
this._hasDataChannelMediaSection = false;
|
|
53
|
+
// Sending DataChannel id value counter. Incremented for each new DataChannel.
|
|
54
|
+
this._nextSendSctpStreamId = 0;
|
|
55
|
+
// Got transport local and remote parameters.
|
|
56
|
+
this._transportReady = false;
|
|
57
|
+
}
|
|
58
|
+
get name() {
|
|
59
|
+
return 'Chrome111';
|
|
60
|
+
}
|
|
61
|
+
close() {
|
|
62
|
+
logger.debug('close()');
|
|
63
|
+
// Close RTCPeerConnection.
|
|
64
|
+
if (this._pc) {
|
|
65
|
+
try {
|
|
66
|
+
this._pc.close();
|
|
67
|
+
}
|
|
68
|
+
catch (error) { }
|
|
69
|
+
}
|
|
70
|
+
this.emit('@close');
|
|
71
|
+
}
|
|
72
|
+
async getNativeRtpCapabilities() {
|
|
73
|
+
logger.debug('getNativeRtpCapabilities()');
|
|
74
|
+
const pc = new RTCPeerConnection({
|
|
75
|
+
iceServers: [],
|
|
76
|
+
iceTransportPolicy: 'all',
|
|
77
|
+
bundlePolicy: 'max-bundle',
|
|
78
|
+
rtcpMuxPolicy: 'require',
|
|
79
|
+
sdpSemantics: 'unified-plan'
|
|
80
|
+
});
|
|
81
|
+
try {
|
|
82
|
+
pc.addTransceiver('audio');
|
|
83
|
+
pc.addTransceiver('video');
|
|
84
|
+
const offer = await pc.createOffer();
|
|
85
|
+
try {
|
|
86
|
+
pc.close();
|
|
87
|
+
}
|
|
88
|
+
catch (error) { }
|
|
89
|
+
const sdpObject = sdpTransform.parse(offer.sdp);
|
|
90
|
+
const nativeRtpCapabilities = sdpCommonUtils.extractRtpCapabilities({ sdpObject });
|
|
91
|
+
return nativeRtpCapabilities;
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
try {
|
|
95
|
+
pc.close();
|
|
96
|
+
}
|
|
97
|
+
catch (error2) { }
|
|
98
|
+
throw error;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
async getNativeSctpCapabilities() {
|
|
102
|
+
logger.debug('getNativeSctpCapabilities()');
|
|
103
|
+
return {
|
|
104
|
+
numStreams: SCTP_NUM_STREAMS
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
run({ direction, iceParameters, iceCandidates, dtlsParameters, sctpParameters, iceServers, iceTransportPolicy, additionalSettings, proprietaryConstraints, extendedRtpCapabilities }) {
|
|
108
|
+
logger.debug('run()');
|
|
109
|
+
this._direction = direction;
|
|
110
|
+
this._remoteSdp = new RemoteSdp_1.RemoteSdp({
|
|
111
|
+
iceParameters,
|
|
112
|
+
iceCandidates,
|
|
113
|
+
dtlsParameters,
|
|
114
|
+
sctpParameters
|
|
115
|
+
});
|
|
116
|
+
this._sendingRtpParametersByKind =
|
|
117
|
+
{
|
|
118
|
+
audio: ortc.getSendingRtpParameters('audio', extendedRtpCapabilities),
|
|
119
|
+
video: ortc.getSendingRtpParameters('video', extendedRtpCapabilities)
|
|
120
|
+
};
|
|
121
|
+
this._sendingRemoteRtpParametersByKind =
|
|
122
|
+
{
|
|
123
|
+
audio: ortc.getSendingRemoteRtpParameters('audio', extendedRtpCapabilities),
|
|
124
|
+
video: ortc.getSendingRemoteRtpParameters('video', extendedRtpCapabilities)
|
|
125
|
+
};
|
|
126
|
+
if (dtlsParameters.role && dtlsParameters.role !== 'auto') {
|
|
127
|
+
this._forcedLocalDtlsRole = dtlsParameters.role === 'server'
|
|
128
|
+
? 'client'
|
|
129
|
+
: 'server';
|
|
130
|
+
}
|
|
131
|
+
this._pc = new RTCPeerConnection({
|
|
132
|
+
iceServers: iceServers || [],
|
|
133
|
+
iceTransportPolicy: iceTransportPolicy || 'all',
|
|
134
|
+
bundlePolicy: 'max-bundle',
|
|
135
|
+
rtcpMuxPolicy: 'require',
|
|
136
|
+
sdpSemantics: 'unified-plan',
|
|
137
|
+
...additionalSettings
|
|
138
|
+
}, proprietaryConstraints);
|
|
139
|
+
if (this._pc.connectionState) {
|
|
140
|
+
this._pc.addEventListener('connectionstatechange', () => {
|
|
141
|
+
this.emit('@connectionstatechange', this._pc.connectionState);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
logger.warn('run() | pc.connectionState not supported, using pc.iceConnectionState');
|
|
146
|
+
this._pc.addEventListener('iceconnectionstatechange', () => {
|
|
147
|
+
switch (this._pc.iceConnectionState) {
|
|
148
|
+
case 'checking':
|
|
149
|
+
this.emit('@connectionstatechange', 'connecting');
|
|
150
|
+
break;
|
|
151
|
+
case 'connected':
|
|
152
|
+
case 'completed':
|
|
153
|
+
this.emit('@connectionstatechange', 'connected');
|
|
154
|
+
break;
|
|
155
|
+
case 'failed':
|
|
156
|
+
this.emit('@connectionstatechange', 'failed');
|
|
157
|
+
break;
|
|
158
|
+
case 'disconnected':
|
|
159
|
+
this.emit('@connectionstatechange', 'disconnected');
|
|
160
|
+
break;
|
|
161
|
+
case 'closed':
|
|
162
|
+
this.emit('@connectionstatechange', 'closed');
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async updateIceServers(iceServers) {
|
|
169
|
+
logger.debug('updateIceServers()');
|
|
170
|
+
const configuration = this._pc.getConfiguration();
|
|
171
|
+
configuration.iceServers = iceServers;
|
|
172
|
+
this._pc.setConfiguration(configuration);
|
|
173
|
+
}
|
|
174
|
+
async restartIce(iceParameters) {
|
|
175
|
+
logger.debug('restartIce()');
|
|
176
|
+
// Provide the remote SDP handler with new remote ICE parameters.
|
|
177
|
+
this._remoteSdp.updateIceParameters(iceParameters);
|
|
178
|
+
if (!this._transportReady)
|
|
179
|
+
return;
|
|
180
|
+
if (this._direction === 'send') {
|
|
181
|
+
const offer = await this._pc.createOffer({ iceRestart: true });
|
|
182
|
+
logger.debug('restartIce() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
183
|
+
await this._pc.setLocalDescription(offer);
|
|
184
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
185
|
+
logger.debug('restartIce() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
186
|
+
await this._pc.setRemoteDescription(answer);
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
190
|
+
logger.debug('restartIce() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
191
|
+
await this._pc.setRemoteDescription(offer);
|
|
192
|
+
const answer = await this._pc.createAnswer();
|
|
193
|
+
logger.debug('restartIce() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
194
|
+
await this._pc.setLocalDescription(answer);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
async getTransportStats() {
|
|
198
|
+
return this._pc.getStats();
|
|
199
|
+
}
|
|
200
|
+
async send({ track, encodings, codecOptions, codec }) {
|
|
201
|
+
var _a;
|
|
202
|
+
this.assertSendDirection();
|
|
203
|
+
logger.debug('send() [kind:%s, track.id:%s]', track.kind, track.id);
|
|
204
|
+
if (encodings && encodings.length > 1) {
|
|
205
|
+
encodings.forEach((encoding, idx) => {
|
|
206
|
+
encoding.rid = `r${idx}`;
|
|
207
|
+
});
|
|
208
|
+
// Set rid and verify scalabilityMode in each encoding.
|
|
209
|
+
// NOTE: Even if WebRTC allows different scalabilityMode (different number
|
|
210
|
+
// of temporal layers) per simulcast stream, we need that those are the
|
|
211
|
+
// same in all them, so let's pick up the highest value.
|
|
212
|
+
// NOTE: If scalabilityMode is not given, Chrome will use L1T3.
|
|
213
|
+
let nextRid = 1;
|
|
214
|
+
let maxTemporalLayers = 1;
|
|
215
|
+
for (const encoding of encodings) {
|
|
216
|
+
const temporalLayers = encoding.scalabilityMode
|
|
217
|
+
? (0, scalabilityModes_1.parse)(encoding.scalabilityMode).temporalLayers
|
|
218
|
+
: 3;
|
|
219
|
+
if (temporalLayers > maxTemporalLayers) {
|
|
220
|
+
maxTemporalLayers = temporalLayers;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
for (const encoding of encodings) {
|
|
224
|
+
encoding.rid = `r${nextRid++}`;
|
|
225
|
+
encoding.scalabilityMode = `L1T${maxTemporalLayers}`;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
const sendingRtpParameters = utils.clone(this._sendingRtpParametersByKind[track.kind], {});
|
|
229
|
+
// This may throw.
|
|
230
|
+
sendingRtpParameters.codecs =
|
|
231
|
+
ortc.reduceCodecs(sendingRtpParameters.codecs, codec);
|
|
232
|
+
const sendingRemoteRtpParameters = utils.clone(this._sendingRemoteRtpParametersByKind[track.kind], {});
|
|
233
|
+
// This may throw.
|
|
234
|
+
sendingRemoteRtpParameters.codecs =
|
|
235
|
+
ortc.reduceCodecs(sendingRemoteRtpParameters.codecs, codec);
|
|
236
|
+
const mediaSectionIdx = this._remoteSdp.getNextMediaSectionIdx();
|
|
237
|
+
const transceiver = this._pc.addTransceiver(track, {
|
|
238
|
+
direction: 'sendonly',
|
|
239
|
+
streams: [this._sendStream],
|
|
240
|
+
sendEncodings: encodings
|
|
241
|
+
});
|
|
242
|
+
const offer = await this._pc.createOffer();
|
|
243
|
+
let localSdpObject = sdpTransform.parse(offer.sdp);
|
|
244
|
+
if (!this._transportReady) {
|
|
245
|
+
await this.setupTransport({
|
|
246
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
247
|
+
localSdpObject
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
logger.debug('send() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
251
|
+
await this._pc.setLocalDescription(offer);
|
|
252
|
+
// We can now get the transceiver.mid.
|
|
253
|
+
const localId = transceiver.mid;
|
|
254
|
+
// Set MID.
|
|
255
|
+
sendingRtpParameters.mid = localId;
|
|
256
|
+
localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);
|
|
257
|
+
const offerMediaObject = localSdpObject.media[mediaSectionIdx.idx];
|
|
258
|
+
// Set RTCP CNAME.
|
|
259
|
+
sendingRtpParameters.rtcp.cname =
|
|
260
|
+
sdpCommonUtils.getCname({ offerMediaObject });
|
|
261
|
+
// Set RTP encodings by parsing the SDP offer if no encodings are given.
|
|
262
|
+
if (!encodings) {
|
|
263
|
+
sendingRtpParameters.encodings =
|
|
264
|
+
sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });
|
|
265
|
+
}
|
|
266
|
+
// Set RTP encodings by parsing the SDP offer and complete them with given
|
|
267
|
+
// one if just a single encoding has been given.
|
|
268
|
+
else if (encodings.length === 1) {
|
|
269
|
+
const newEncodings = sdpUnifiedPlanUtils.getRtpEncodings({ offerMediaObject });
|
|
270
|
+
Object.assign(newEncodings[0], encodings[0]);
|
|
271
|
+
sendingRtpParameters.encodings = newEncodings;
|
|
272
|
+
}
|
|
273
|
+
// Otherwise if more than 1 encoding are given use them verbatim.
|
|
274
|
+
else {
|
|
275
|
+
sendingRtpParameters.encodings = encodings;
|
|
276
|
+
}
|
|
277
|
+
this._remoteSdp.send({
|
|
278
|
+
offerMediaObject,
|
|
279
|
+
reuseMid: mediaSectionIdx.reuseMid,
|
|
280
|
+
offerRtpParameters: sendingRtpParameters,
|
|
281
|
+
answerRtpParameters: sendingRemoteRtpParameters,
|
|
282
|
+
codecOptions,
|
|
283
|
+
extmapAllowMixed: true
|
|
284
|
+
});
|
|
285
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
286
|
+
logger.debug('send() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
287
|
+
await this._pc.setRemoteDescription(answer);
|
|
288
|
+
// Store in the map.
|
|
289
|
+
this._mapMidTransceiver.set(localId, transceiver);
|
|
290
|
+
return {
|
|
291
|
+
localId,
|
|
292
|
+
rtpParameters: sendingRtpParameters,
|
|
293
|
+
rtpSender: transceiver.sender
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
async stopSending(localId) {
|
|
297
|
+
this.assertSendDirection();
|
|
298
|
+
logger.debug('stopSending() [localId:%s]', localId);
|
|
299
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
300
|
+
if (!transceiver)
|
|
301
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
302
|
+
transceiver.sender.replaceTrack(null);
|
|
303
|
+
this._pc.removeTrack(transceiver.sender);
|
|
304
|
+
const mediaSectionClosed = this._remoteSdp.closeMediaSection(transceiver.mid);
|
|
305
|
+
if (mediaSectionClosed) {
|
|
306
|
+
try {
|
|
307
|
+
transceiver.stop();
|
|
308
|
+
}
|
|
309
|
+
catch (error) { }
|
|
310
|
+
}
|
|
311
|
+
const offer = await this._pc.createOffer();
|
|
312
|
+
logger.debug('stopSending() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
313
|
+
await this._pc.setLocalDescription(offer);
|
|
314
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
315
|
+
logger.debug('stopSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
316
|
+
await this._pc.setRemoteDescription(answer);
|
|
317
|
+
this._mapMidTransceiver.delete(localId);
|
|
318
|
+
}
|
|
319
|
+
async pauseSending(localId) {
|
|
320
|
+
this.assertSendDirection();
|
|
321
|
+
logger.debug('pauseSending() [localId:%s]', localId);
|
|
322
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
323
|
+
if (!transceiver)
|
|
324
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
325
|
+
transceiver.direction = 'inactive';
|
|
326
|
+
this._remoteSdp.pauseMediaSection(localId);
|
|
327
|
+
const offer = await this._pc.createOffer();
|
|
328
|
+
logger.debug('pauseSending() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
329
|
+
await this._pc.setLocalDescription(offer);
|
|
330
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
331
|
+
logger.debug('pauseSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
332
|
+
await this._pc.setRemoteDescription(answer);
|
|
333
|
+
}
|
|
334
|
+
async resumeSending(localId) {
|
|
335
|
+
this.assertSendDirection();
|
|
336
|
+
logger.debug('resumeSending() [localId:%s]', localId);
|
|
337
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
338
|
+
this._remoteSdp.resumeSendingMediaSection(localId);
|
|
339
|
+
if (!transceiver)
|
|
340
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
341
|
+
transceiver.direction = 'sendonly';
|
|
342
|
+
const offer = await this._pc.createOffer();
|
|
343
|
+
logger.debug('resumeSending() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
344
|
+
await this._pc.setLocalDescription(offer);
|
|
345
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
346
|
+
logger.debug('resumeSending() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
347
|
+
await this._pc.setRemoteDescription(answer);
|
|
348
|
+
}
|
|
349
|
+
async replaceTrack(localId, track) {
|
|
350
|
+
this.assertSendDirection();
|
|
351
|
+
if (track) {
|
|
352
|
+
logger.debug('replaceTrack() [localId:%s, track.id:%s]', localId, track.id);
|
|
353
|
+
}
|
|
354
|
+
else {
|
|
355
|
+
logger.debug('replaceTrack() [localId:%s, no track]', localId);
|
|
356
|
+
}
|
|
357
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
358
|
+
if (!transceiver)
|
|
359
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
360
|
+
await transceiver.sender.replaceTrack(track);
|
|
361
|
+
}
|
|
362
|
+
async setMaxSpatialLayer(localId, spatialLayer) {
|
|
363
|
+
this.assertSendDirection();
|
|
364
|
+
logger.debug('setMaxSpatialLayer() [localId:%s, spatialLayer:%s]', localId, spatialLayer);
|
|
365
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
366
|
+
if (!transceiver)
|
|
367
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
368
|
+
const parameters = transceiver.sender.getParameters();
|
|
369
|
+
parameters.encodings.forEach((encoding, idx) => {
|
|
370
|
+
if (idx <= spatialLayer)
|
|
371
|
+
encoding.active = true;
|
|
372
|
+
else
|
|
373
|
+
encoding.active = false;
|
|
374
|
+
});
|
|
375
|
+
await transceiver.sender.setParameters(parameters);
|
|
376
|
+
this._remoteSdp.muxMediaSectionSimulcast(localId, parameters.encodings);
|
|
377
|
+
const offer = await this._pc.createOffer();
|
|
378
|
+
logger.debug('setMaxSpatialLayer() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
379
|
+
await this._pc.setLocalDescription(offer);
|
|
380
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
381
|
+
logger.debug('setMaxSpatialLayer() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
382
|
+
await this._pc.setRemoteDescription(answer);
|
|
383
|
+
}
|
|
384
|
+
async setRtpEncodingParameters(localId, params) {
|
|
385
|
+
this.assertSendDirection();
|
|
386
|
+
logger.debug('setRtpEncodingParameters() [localId:%s, params:%o]', localId, params);
|
|
387
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
388
|
+
if (!transceiver)
|
|
389
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
390
|
+
const parameters = transceiver.sender.getParameters();
|
|
391
|
+
parameters.encodings.forEach((encoding, idx) => {
|
|
392
|
+
parameters.encodings[idx] = { ...encoding, ...params };
|
|
393
|
+
});
|
|
394
|
+
await transceiver.sender.setParameters(parameters);
|
|
395
|
+
this._remoteSdp.muxMediaSectionSimulcast(localId, parameters.encodings);
|
|
396
|
+
const offer = await this._pc.createOffer();
|
|
397
|
+
logger.debug('setRtpEncodingParameters() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
398
|
+
await this._pc.setLocalDescription(offer);
|
|
399
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
400
|
+
logger.debug('setRtpEncodingParameters() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
401
|
+
await this._pc.setRemoteDescription(answer);
|
|
402
|
+
}
|
|
403
|
+
async getSenderStats(localId) {
|
|
404
|
+
this.assertSendDirection();
|
|
405
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
406
|
+
if (!transceiver)
|
|
407
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
408
|
+
return transceiver.sender.getStats();
|
|
409
|
+
}
|
|
410
|
+
async sendDataChannel({ ordered, maxPacketLifeTime, maxRetransmits, label, protocol }) {
|
|
411
|
+
var _a;
|
|
412
|
+
this.assertSendDirection();
|
|
413
|
+
const options = {
|
|
414
|
+
negotiated: true,
|
|
415
|
+
id: this._nextSendSctpStreamId,
|
|
416
|
+
ordered,
|
|
417
|
+
maxPacketLifeTime,
|
|
418
|
+
maxRetransmits,
|
|
419
|
+
protocol
|
|
420
|
+
};
|
|
421
|
+
logger.debug('sendDataChannel() [options:%o]', options);
|
|
422
|
+
const dataChannel = this._pc.createDataChannel(label, options);
|
|
423
|
+
// Increase next id.
|
|
424
|
+
this._nextSendSctpStreamId =
|
|
425
|
+
++this._nextSendSctpStreamId % SCTP_NUM_STREAMS.MIS;
|
|
426
|
+
// If this is the first DataChannel we need to create the SDP answer with
|
|
427
|
+
// m=application section.
|
|
428
|
+
if (!this._hasDataChannelMediaSection) {
|
|
429
|
+
const offer = await this._pc.createOffer();
|
|
430
|
+
const localSdpObject = sdpTransform.parse(offer.sdp);
|
|
431
|
+
const offerMediaObject = localSdpObject.media
|
|
432
|
+
.find((m) => m.type === 'application');
|
|
433
|
+
if (!this._transportReady) {
|
|
434
|
+
await this.setupTransport({
|
|
435
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
436
|
+
localSdpObject
|
|
437
|
+
});
|
|
438
|
+
}
|
|
439
|
+
logger.debug('sendDataChannel() | calling pc.setLocalDescription() [offer:%o]', offer);
|
|
440
|
+
await this._pc.setLocalDescription(offer);
|
|
441
|
+
this._remoteSdp.sendSctpAssociation({ offerMediaObject });
|
|
442
|
+
const answer = { type: 'answer', sdp: this._remoteSdp.getSdp() };
|
|
443
|
+
logger.debug('sendDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
444
|
+
await this._pc.setRemoteDescription(answer);
|
|
445
|
+
this._hasDataChannelMediaSection = true;
|
|
446
|
+
}
|
|
447
|
+
const sctpStreamParameters = {
|
|
448
|
+
streamId: options.id,
|
|
449
|
+
ordered: options.ordered,
|
|
450
|
+
maxPacketLifeTime: options.maxPacketLifeTime,
|
|
451
|
+
maxRetransmits: options.maxRetransmits
|
|
452
|
+
};
|
|
453
|
+
return { dataChannel, sctpStreamParameters };
|
|
454
|
+
}
|
|
455
|
+
async receive(optionsList) {
|
|
456
|
+
var _a;
|
|
457
|
+
this.assertRecvDirection();
|
|
458
|
+
const results = [];
|
|
459
|
+
const mapLocalId = new Map();
|
|
460
|
+
for (const options of optionsList) {
|
|
461
|
+
const { trackId, kind, rtpParameters, streamId } = options;
|
|
462
|
+
logger.debug('receive() [trackId:%s, kind:%s]', trackId, kind);
|
|
463
|
+
const localId = rtpParameters.mid || String(this._mapMidTransceiver.size);
|
|
464
|
+
mapLocalId.set(trackId, localId);
|
|
465
|
+
this._remoteSdp.receive({
|
|
466
|
+
mid: localId,
|
|
467
|
+
kind,
|
|
468
|
+
offerRtpParameters: rtpParameters,
|
|
469
|
+
streamId: streamId || rtpParameters.rtcp.cname,
|
|
470
|
+
trackId
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
474
|
+
logger.debug('receive() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
475
|
+
await this._pc.setRemoteDescription(offer);
|
|
476
|
+
let answer = await this._pc.createAnswer();
|
|
477
|
+
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
478
|
+
for (const options of optionsList) {
|
|
479
|
+
const { trackId, rtpParameters } = options;
|
|
480
|
+
const localId = mapLocalId.get(trackId);
|
|
481
|
+
const answerMediaObject = localSdpObject.media
|
|
482
|
+
.find((m) => String(m.mid) === localId);
|
|
483
|
+
// May need to modify codec parameters in the answer based on codec
|
|
484
|
+
// parameters in the offer.
|
|
485
|
+
sdpCommonUtils.applyCodecParameters({
|
|
486
|
+
offerRtpParameters: rtpParameters,
|
|
487
|
+
answerMediaObject
|
|
488
|
+
});
|
|
489
|
+
}
|
|
490
|
+
answer = { type: 'answer', sdp: sdpTransform.write(localSdpObject) };
|
|
491
|
+
if (!this._transportReady) {
|
|
492
|
+
await this.setupTransport({
|
|
493
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
494
|
+
localSdpObject
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
logger.debug('receive() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
498
|
+
await this._pc.setLocalDescription(answer);
|
|
499
|
+
for (const options of optionsList) {
|
|
500
|
+
const { trackId } = options;
|
|
501
|
+
const localId = mapLocalId.get(trackId);
|
|
502
|
+
const transceiver = this._pc.getTransceivers()
|
|
503
|
+
.find((t) => t.mid === localId);
|
|
504
|
+
if (!transceiver) {
|
|
505
|
+
throw new Error('new RTCRtpTransceiver not found');
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
// Store in the map.
|
|
509
|
+
this._mapMidTransceiver.set(localId, transceiver);
|
|
510
|
+
results.push({
|
|
511
|
+
localId,
|
|
512
|
+
track: transceiver.receiver.track,
|
|
513
|
+
rtpReceiver: transceiver.receiver
|
|
514
|
+
});
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return results;
|
|
518
|
+
}
|
|
519
|
+
async stopReceiving(localIds) {
|
|
520
|
+
this.assertRecvDirection();
|
|
521
|
+
for (const localId of localIds) {
|
|
522
|
+
logger.debug('stopReceiving() [localId:%s]', localId);
|
|
523
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
524
|
+
if (!transceiver)
|
|
525
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
526
|
+
this._remoteSdp.closeMediaSection(transceiver.mid);
|
|
527
|
+
}
|
|
528
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
529
|
+
logger.debug('stopReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
530
|
+
await this._pc.setRemoteDescription(offer);
|
|
531
|
+
const answer = await this._pc.createAnswer();
|
|
532
|
+
logger.debug('stopReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
533
|
+
await this._pc.setLocalDescription(answer);
|
|
534
|
+
for (const localId of localIds) {
|
|
535
|
+
this._mapMidTransceiver.delete(localId);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
async pauseReceiving(localIds) {
|
|
539
|
+
this.assertRecvDirection();
|
|
540
|
+
for (const localId of localIds) {
|
|
541
|
+
logger.debug('pauseReceiving() [localId:%s]', localId);
|
|
542
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
543
|
+
if (!transceiver)
|
|
544
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
545
|
+
transceiver.direction = 'inactive';
|
|
546
|
+
this._remoteSdp.pauseMediaSection(localId);
|
|
547
|
+
}
|
|
548
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
549
|
+
logger.debug('pauseReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
550
|
+
await this._pc.setRemoteDescription(offer);
|
|
551
|
+
const answer = await this._pc.createAnswer();
|
|
552
|
+
logger.debug('pauseReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
553
|
+
await this._pc.setLocalDescription(answer);
|
|
554
|
+
}
|
|
555
|
+
async resumeReceiving(localIds) {
|
|
556
|
+
this.assertRecvDirection();
|
|
557
|
+
for (const localId of localIds) {
|
|
558
|
+
logger.debug('resumeReceiving() [localId:%s]', localId);
|
|
559
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
560
|
+
if (!transceiver)
|
|
561
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
562
|
+
transceiver.direction = 'recvonly';
|
|
563
|
+
this._remoteSdp.resumeReceivingMediaSection(localId);
|
|
564
|
+
}
|
|
565
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
566
|
+
logger.debug('resumeReceiving() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
567
|
+
await this._pc.setRemoteDescription(offer);
|
|
568
|
+
const answer = await this._pc.createAnswer();
|
|
569
|
+
logger.debug('resumeReceiving() | calling pc.setLocalDescription() [answer:%o]', answer);
|
|
570
|
+
await this._pc.setLocalDescription(answer);
|
|
571
|
+
}
|
|
572
|
+
async getReceiverStats(localId) {
|
|
573
|
+
this.assertRecvDirection();
|
|
574
|
+
const transceiver = this._mapMidTransceiver.get(localId);
|
|
575
|
+
if (!transceiver)
|
|
576
|
+
throw new Error('associated RTCRtpTransceiver not found');
|
|
577
|
+
return transceiver.receiver.getStats();
|
|
578
|
+
}
|
|
579
|
+
async receiveDataChannel({ sctpStreamParameters, label, protocol }) {
|
|
580
|
+
var _a;
|
|
581
|
+
this.assertRecvDirection();
|
|
582
|
+
const { streamId, ordered, maxPacketLifeTime, maxRetransmits } = sctpStreamParameters;
|
|
583
|
+
const options = {
|
|
584
|
+
negotiated: true,
|
|
585
|
+
id: streamId,
|
|
586
|
+
ordered,
|
|
587
|
+
maxPacketLifeTime,
|
|
588
|
+
maxRetransmits,
|
|
589
|
+
protocol
|
|
590
|
+
};
|
|
591
|
+
logger.debug('receiveDataChannel() [options:%o]', options);
|
|
592
|
+
const dataChannel = this._pc.createDataChannel(label, options);
|
|
593
|
+
// If this is the first DataChannel we need to create the SDP offer with
|
|
594
|
+
// m=application section.
|
|
595
|
+
if (!this._hasDataChannelMediaSection) {
|
|
596
|
+
this._remoteSdp.receiveSctpAssociation();
|
|
597
|
+
const offer = { type: 'offer', sdp: this._remoteSdp.getSdp() };
|
|
598
|
+
logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [offer:%o]', offer);
|
|
599
|
+
await this._pc.setRemoteDescription(offer);
|
|
600
|
+
const answer = await this._pc.createAnswer();
|
|
601
|
+
if (!this._transportReady) {
|
|
602
|
+
const localSdpObject = sdpTransform.parse(answer.sdp);
|
|
603
|
+
await this.setupTransport({
|
|
604
|
+
localDtlsRole: (_a = this._forcedLocalDtlsRole) !== null && _a !== void 0 ? _a : 'client',
|
|
605
|
+
localSdpObject
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
logger.debug('receiveDataChannel() | calling pc.setRemoteDescription() [answer:%o]', answer);
|
|
609
|
+
await this._pc.setLocalDescription(answer);
|
|
610
|
+
this._hasDataChannelMediaSection = true;
|
|
611
|
+
}
|
|
612
|
+
return { dataChannel };
|
|
613
|
+
}
|
|
614
|
+
async setupTransport({ localDtlsRole, localSdpObject }) {
|
|
615
|
+
if (!localSdpObject)
|
|
616
|
+
localSdpObject = sdpTransform.parse(this._pc.localDescription.sdp);
|
|
617
|
+
// Get our local DTLS parameters.
|
|
618
|
+
const dtlsParameters = sdpCommonUtils.extractDtlsParameters({ sdpObject: localSdpObject });
|
|
619
|
+
// Set our DTLS role.
|
|
620
|
+
dtlsParameters.role = localDtlsRole;
|
|
621
|
+
// Update the remote DTLS role in the SDP.
|
|
622
|
+
this._remoteSdp.updateDtlsRole(localDtlsRole === 'client' ? 'server' : 'client');
|
|
623
|
+
// Need to tell the remote transport about our parameters.
|
|
624
|
+
await new Promise((resolve, reject) => {
|
|
625
|
+
this.safeEmit('@connect', { dtlsParameters }, resolve, reject);
|
|
626
|
+
});
|
|
627
|
+
this._transportReady = true;
|
|
628
|
+
}
|
|
629
|
+
assertSendDirection() {
|
|
630
|
+
if (this._direction !== 'send') {
|
|
631
|
+
throw new Error('method can just be called for handlers with "send" direction');
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
assertRecvDirection() {
|
|
635
|
+
if (this._direction !== 'recv') {
|
|
636
|
+
throw new Error('method can just be called for handlers with "recv" direction');
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
exports.Chrome111 = Chrome111;
|
package/lib/handlers/Chrome55.js
CHANGED
|
@@ -262,7 +262,7 @@ class Chrome55 extends HandlerInterface_1.HandlerInterface {
|
|
|
262
262
|
if (sendingRtpParameters.encodings.length > 1 &&
|
|
263
263
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8') {
|
|
264
264
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
265
|
-
encoding.scalabilityMode = '
|
|
265
|
+
encoding.scalabilityMode = 'L1T3';
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
this._remoteSdp.send({
|
package/lib/handlers/Chrome67.js
CHANGED
|
@@ -262,7 +262,7 @@ class Chrome67 extends HandlerInterface_1.HandlerInterface {
|
|
|
262
262
|
if (sendingRtpParameters.encodings.length > 1 &&
|
|
263
263
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8') {
|
|
264
264
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
265
|
-
encoding.scalabilityMode = '
|
|
265
|
+
encoding.scalabilityMode = 'L1T3';
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
this._remoteSdp.send({
|
package/lib/handlers/Chrome70.js
CHANGED
|
@@ -292,7 +292,7 @@ class Chrome70 extends HandlerInterface_1.HandlerInterface {
|
|
|
292
292
|
(sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||
|
|
293
293
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {
|
|
294
294
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
295
|
-
encoding.scalabilityMode = '
|
|
295
|
+
encoding.scalabilityMode = 'L1T3';
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
this._remoteSdp.send({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chrome74.d.ts","sourceRoot":"","sources":["../../src/handlers/Chrome74.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAY,MAAM,cAAc,CAAC;AACvD,OAAO,EACN,eAAe,EAGf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAM3E,qBAAa,QAAS,SAAQ,gBAAgB;IAG7C,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,OAAO,CAAC,UAAU,CAAC,CAAY;IAE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AAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAgE7B,cAAc;IAuC5B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;CAQ3B"}
|
package/lib/handlers/Chrome74.js
CHANGED
|
@@ -283,12 +283,10 @@ class Chrome74 extends HandlerInterface_1.HandlerInterface {
|
|
|
283
283
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {
|
|
284
284
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
285
285
|
if (encoding.scalabilityMode) {
|
|
286
|
-
encoding.scalabilityMode = `
|
|
286
|
+
encoding.scalabilityMode = `L1T${layers.temporalLayers}`;
|
|
287
287
|
}
|
|
288
288
|
else {
|
|
289
|
-
|
|
290
|
-
// anyway).
|
|
291
|
-
encoding.scalabilityMode = 'S1T2';
|
|
289
|
+
encoding.scalabilityMode = 'L1T3';
|
|
292
290
|
}
|
|
293
291
|
}
|
|
294
292
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Firefox60.d.ts","sourceRoot":"","sources":["../../src/handlers/Firefox60.ts"],"names":[],"mappings":"AAOA,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAY,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,eAAe,EAAiB,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAwB,MAAM,mBAAmB,CAAC;AAM3E,qBAAa,SAAU,SAAQ,gBAAgB;IAG9C,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC,OAAO,CAAC,UAAU,CAAC,CAAY;IA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ACzE,OAAO,CAAC,+BAA+B,CAAC;YA4D7B,cAAc;IAuC5B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;CAQ3B"}
|
|
@@ -296,11 +296,10 @@ class Firefox60 extends HandlerInterface_1.HandlerInterface {
|
|
|
296
296
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {
|
|
297
297
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
298
298
|
if (encoding.scalabilityMode) {
|
|
299
|
-
encoding.scalabilityMode = `
|
|
299
|
+
encoding.scalabilityMode = `L1T${layers.temporalLayers}`;
|
|
300
300
|
}
|
|
301
301
|
else {
|
|
302
|
-
|
|
303
|
-
encoding.scalabilityMode = 'S1T2';
|
|
302
|
+
encoding.scalabilityMode = 'L1T3';
|
|
304
303
|
}
|
|
305
304
|
}
|
|
306
305
|
}
|
|
@@ -268,7 +268,7 @@ class ReactNative extends HandlerInterface_1.HandlerInterface {
|
|
|
268
268
|
(sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||
|
|
269
269
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {
|
|
270
270
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
271
|
-
encoding.scalabilityMode = '
|
|
271
|
+
encoding.scalabilityMode = 'L1T3';
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
this._remoteSdp.send({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativeUnifiedPlan.d.ts","sourceRoot":"","sources":["../../src/handlers/ReactNativeUnifiedPlan.ts"],"names":[],"mappings":"AAMA,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,6BAA6B,EAC7B,4BAA4B,EAC5B,gCAAgC,EAChC,+BAA+B,EAC/B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EA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AM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsChD,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCjD,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkClD,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAY1D,kBAAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAgE7B,cAAc;IAuC5B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;CAQ3B"}
|
|
@@ -286,7 +286,12 @@ class ReactNativeUnifiedPlan extends HandlerInterface_1.HandlerInterface {
|
|
|
286
286
|
(sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8' ||
|
|
287
287
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {
|
|
288
288
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
289
|
-
encoding.scalabilityMode
|
|
289
|
+
if (encoding.scalabilityMode) {
|
|
290
|
+
encoding.scalabilityMode = `L1T${layers.temporalLayers}`;
|
|
291
|
+
}
|
|
292
|
+
else {
|
|
293
|
+
encoding.scalabilityMode = 'L1T3';
|
|
294
|
+
}
|
|
290
295
|
}
|
|
291
296
|
}
|
|
292
297
|
this._remoteSdp.send({
|
package/lib/handlers/Safari11.js
CHANGED
|
@@ -260,7 +260,7 @@ class Safari11 extends HandlerInterface_1.HandlerInterface {
|
|
|
260
260
|
if (sendingRtpParameters.encodings.length > 1 &&
|
|
261
261
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/vp8') {
|
|
262
262
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
263
|
-
encoding.scalabilityMode = '
|
|
263
|
+
encoding.scalabilityMode = 'L1T3';
|
|
264
264
|
}
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AAO,CAAC,IAAI,CAAC;IAyCrE,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAYxD,eAAe,CACpB,EACC,OAAO,EACP,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,QAAQ,EACR,EAAE,6BAA6B,GAC9B,OAAO,CAAC,4BAA4B,CAAC;IAsElC,OAAO,CACZ,WAAW,EAAE,qBAAqB,EAAE,GACjC,OAAO,CAAC,oBAAoB,EAAE,CAAC;IA8F7B,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAsChD,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkCjD,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAkClD,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAY1D,kBAAkB,CACvB,EAAE,oBAAoB,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gCAAgC,GACzE,OAAO,CAAC,+BAA+B,CAAC;YAgE7B,cAAc;IAuC5B,OAAO,CAAC,mBAAmB;IAS3B,OAAO,CAAC,mBAAmB;CAQ3B"}
|
package/lib/handlers/Safari12.js
CHANGED
|
@@ -257,11 +257,10 @@ class Safari12 extends HandlerInterface_1.HandlerInterface {
|
|
|
257
257
|
sendingRtpParameters.codecs[0].mimeType.toLowerCase() === 'video/h264')) {
|
|
258
258
|
for (const encoding of sendingRtpParameters.encodings) {
|
|
259
259
|
if (encoding.scalabilityMode) {
|
|
260
|
-
encoding.scalabilityMode = `
|
|
260
|
+
encoding.scalabilityMode = `L1T${layers.temporalLayers}`;
|
|
261
261
|
}
|
|
262
262
|
else {
|
|
263
|
-
|
|
264
|
-
encoding.scalabilityMode = 'S1T3';
|
|
263
|
+
encoding.scalabilityMode = 'L1T3';
|
|
265
264
|
}
|
|
266
265
|
}
|
|
267
266
|
}
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mediasoup-client",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.80",
|
|
4
4
|
"description": "mediasoup client side JavaScript library",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"eslint": "^8.34.0",
|
|
81
81
|
"eslint-plugin-jest": "^27.2.1",
|
|
82
82
|
"fake-mediastreamtrack": "^1.1.6",
|
|
83
|
-
"jest": "^29.4.
|
|
83
|
+
"jest": "^29.4.3",
|
|
84
84
|
"open-cli": "^7.1.0",
|
|
85
85
|
"ts-jest": "^29.0.5",
|
|
86
86
|
"tsc-watch": "^6.0.0",
|