twilio-video 2.22.0 → 2.23.0
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/CHANGELOG.md +67 -1
- package/README.md +1 -1
- package/assets/noisecancellation/rnnoise/rnnoise-processor.wasm +0 -0
- package/assets/noisecancellation/rnnoise/rnnoise_processor.js +103 -0
- package/assets/noisecancellation/rnnoise/rnnoise_sdk.mjs +150 -0
- package/dist/twilio-video.js +710 -220
- package/dist/twilio-video.min.js +21 -20
- package/es5/connect.js +1 -1
- package/es5/connect.js.map +1 -1
- package/es5/createlocaltrack.js +38 -8
- package/es5/createlocaltrack.js.map +1 -1
- package/es5/createlocaltracks.js +36 -11
- package/es5/createlocaltracks.js.map +1 -1
- package/es5/dynamicImport.js +9 -0
- package/es5/index.js +1 -1
- package/es5/index.js.map +1 -1
- package/es5/localparticipant.js +10 -1
- package/es5/localparticipant.js.map +1 -1
- package/es5/media/track/localaudiotrack.js +27 -1
- package/es5/media/track/localaudiotrack.js.map +1 -1
- package/es5/media/track/noisecancellationimpl.js +198 -0
- package/es5/media/track/noisecancellationimpl.js.map +1 -0
- package/es5/noisecancellationadapter.js +122 -0
- package/es5/noisecancellationadapter.js.map +1 -0
- package/es5/preflight/preflighttest.js +2 -2
- package/es5/preflight/preflighttest.js.map +1 -1
- package/es5/room.js +12 -0
- package/es5/room.js.map +1 -1
- package/es5/signaling/localparticipant.js +4 -2
- package/es5/signaling/localparticipant.js.map +1 -1
- package/es5/signaling/v2/cancelableroomsignalingpromise.js +0 -2
- package/es5/signaling/v2/cancelableroomsignalingpromise.js.map +1 -1
- package/es5/signaling/v2/localparticipant.js +16 -4
- package/es5/signaling/v2/localparticipant.js.map +1 -1
- package/es5/signaling/v2/localtrackpublication.js +12 -3
- package/es5/signaling/v2/localtrackpublication.js.map +1 -1
- package/es5/signaling/v2/peerconnection.js +23 -7
- package/es5/signaling/v2/peerconnection.js.map +1 -1
- package/es5/signaling/v2/room.js +8 -1
- package/es5/signaling/v2/room.js.map +1 -1
- package/es5/util/support.js +2 -0
- package/es5/util/support.js.map +1 -1
- package/es5/webrtc/util/sdp.js +10 -1
- package/es5/webrtc/util/sdp.js.map +1 -1
- package/karma/makeconf.js +11 -1
- package/lib/connect.js +2 -1
- package/lib/createlocaltrack.js +41 -8
- package/lib/createlocaltracks.ts +35 -11
- package/lib/dynamicImport.js +9 -0
- package/lib/index.ts +5 -3
- package/lib/localparticipant.js +10 -1
- package/lib/media/track/localaudiotrack.js +27 -0
- package/lib/media/track/noisecancellationimpl.ts +143 -0
- package/lib/noisecancellationadapter.ts +93 -0
- package/lib/preflight/preflighttest.ts +1 -1
- package/lib/room.js +13 -0
- package/lib/signaling/localparticipant.js +3 -2
- package/lib/signaling/v2/cancelableroomsignalingpromise.js +0 -3
- package/lib/signaling/v2/localparticipant.js +17 -4
- package/lib/signaling/v2/localtrackpublication.js +14 -3
- package/lib/signaling/v2/peerconnection.js +22 -7
- package/lib/signaling/v2/room.js +13 -1
- package/lib/util/support.js +2 -0
- package/lib/webrtc/util/sdp.js +11 -1
- package/package.json +2 -2
- package/tsconfig.json +4 -0
- package/tsdef/AudioProcessor.d.ts +65 -0
- package/tsdef/LocalAudioTrack.d.ts +2 -0
- package/tsdef/index.d.ts +7 -2
- package/tsdef/types.d.ts +23 -2
package/dist/twilio-video.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! twilio-video.js 2.
|
|
1
|
+
/*! twilio-video.js 2.23.0
|
|
2
2
|
|
|
3
3
|
The following license applies to all parts of this software except as
|
|
4
4
|
documented below.
|
|
@@ -83,7 +83,7 @@ function createCancelableRoomPromise(getLocalTracks, createLocalParticipant, cre
|
|
|
83
83
|
}
|
|
84
84
|
module.exports = createCancelableRoomPromise;
|
|
85
85
|
|
|
86
|
-
},{"./util/cancelablepromise":
|
|
86
|
+
},{"./util/cancelablepromise":124}],2:[function(require,module,exports){
|
|
87
87
|
'use strict';
|
|
88
88
|
var MediaStreamTrack = require('./webrtc').MediaStreamTrack;
|
|
89
89
|
var _a = require('./webrtc/util'), guessBrowser = _a.guessBrowser, guessBrowserVersion = _a.guessBrowserVersion;
|
|
@@ -435,7 +435,7 @@ function connect(token, options) {
|
|
|
435
435
|
* You may pass these options to {@link connect} in order to override the
|
|
436
436
|
* default behavior.
|
|
437
437
|
* @typedef {object} ConnectOptions
|
|
438
|
-
* @property {boolean|
|
|
438
|
+
* @property {boolean|CreateLocalTracksOptions|CreateLocalAudioTrackOptions} [audio=true] - Whether or not to
|
|
439
439
|
* get local audio with <code>getUserMedia</code> when <code>tracks</code>
|
|
440
440
|
* are not provided.
|
|
441
441
|
* @property {boolean} [automaticSubscription=true] - By default, you will subscribe
|
|
@@ -999,7 +999,7 @@ function normalizeCodecSettings(nameOrSettings) {
|
|
|
999
999
|
}
|
|
1000
1000
|
module.exports = connect;
|
|
1001
1001
|
|
|
1002
|
-
},{"./cancelableroompromise":1,"./encodingparameters":
|
|
1002
|
+
},{"./cancelableroompromise":1,"./encodingparameters":10,"./localparticipant":13,"./media/track/es5":15,"./networkqualityconfiguration":44,"./room":57,"./signaling/v2":71,"./util":131,"./util/cancelablepromise":124,"./util/constants":125,"./util/eventobserver":129,"./util/insightspublisher":132,"./util/insightspublisher/null":133,"./util/log":135,"./util/validate":149,"./webrtc":157,"./webrtc/util":170}],3:[function(require,module,exports){
|
|
1003
1003
|
'use strict';
|
|
1004
1004
|
var _a = require('./util/constants'), DEFAULT_LOG_LEVEL = _a.DEFAULT_LOG_LEVEL, DEFAULT_LOGGER_NAME = _a.DEFAULT_LOGGER_NAME;
|
|
1005
1005
|
/**
|
|
@@ -1027,7 +1027,7 @@ function createLocalTrack(kind, options) {
|
|
|
1027
1027
|
/**
|
|
1028
1028
|
* Request a {@link LocalAudioTrack}.
|
|
1029
1029
|
* @alias module:twilio-video.createLocalAudioTrack
|
|
1030
|
-
* @param {
|
|
1030
|
+
* @param {CreateLocalTracksOptions|CreateLocalAudioTrackOptions} [options] - Options for requesting a {@link LocalAudioTrack}
|
|
1031
1031
|
* @returns {Promise<LocalAudioTrack>}
|
|
1032
1032
|
* @example
|
|
1033
1033
|
* var Video = require('twilio-video');
|
|
@@ -1045,9 +1045,14 @@ function createLocalTrack(kind, options) {
|
|
|
1045
1045
|
* @example
|
|
1046
1046
|
* var Video = require('twilio-video');
|
|
1047
1047
|
*
|
|
1048
|
-
* // Request the
|
|
1049
|
-
*
|
|
1050
|
-
*
|
|
1048
|
+
* // Request the LocalAudioTrack with a custom name
|
|
1049
|
+
* // and krisp noise cancellation
|
|
1050
|
+
* Video.createLocalAudioTrack({
|
|
1051
|
+
* name: 'microphone',
|
|
1052
|
+
* noiseCancellationOptions: {
|
|
1053
|
+
* vendor: 'krisp',
|
|
1054
|
+
* sdkAssetsPath: '/twilio-krisp-audio-plugin/1.0.0/dist'
|
|
1055
|
+
* }
|
|
1051
1056
|
* });
|
|
1052
1057
|
*/
|
|
1053
1058
|
function createLocalAudioTrack(options) {
|
|
@@ -1085,6 +1090,35 @@ function createLocalAudioTrack(options) {
|
|
|
1085
1090
|
function createLocalVideoTrack(options) {
|
|
1086
1091
|
return createLocalTrack('video', options);
|
|
1087
1092
|
}
|
|
1093
|
+
/**
|
|
1094
|
+
* {@link NoiseCancellationVendor} specifies the 3rd party plugin to use for noise cancellation.
|
|
1095
|
+
* @enum {string}
|
|
1096
|
+
*/
|
|
1097
|
+
// eslint-disable-next-line
|
|
1098
|
+
var NoiseCancellationVendor = {
|
|
1099
|
+
/**
|
|
1100
|
+
* This plugin can be found by requesting access with this form {@link https://forms.gle/eeFyoGJj1mgMrxN88}
|
|
1101
|
+
*/
|
|
1102
|
+
krisp: 'krisp',
|
|
1103
|
+
};
|
|
1104
|
+
/**
|
|
1105
|
+
* You can use 3rd party noise cancellation plugin when creating {@link LocalAudioTrack}
|
|
1106
|
+
* By specifying these options. This is a beta feature.
|
|
1107
|
+
* @typedef {object} NoiseCancellationOptions
|
|
1108
|
+
* @property {NoiseCancellationVendor} vendor - Specifies the vendor library to use
|
|
1109
|
+
* You need to obtain and host the library files on your web server.
|
|
1110
|
+
* @property {string} sdkAssetsPath - Specifies path where vendor library files are
|
|
1111
|
+
* hosted on your web server.
|
|
1112
|
+
*/
|
|
1113
|
+
/**
|
|
1114
|
+
* Create {@link LocalAudioTrack} options.
|
|
1115
|
+
* @typedef {CreateLocalTrackOptions} CreateLocalAudioTrackOptions
|
|
1116
|
+
* @property {boolean} [workaroundWebKitBug180748=false] - setting this
|
|
1117
|
+
* attempts to workaround WebKit Bug 180748, where, in Safari, getUserMedia may return a silent audio
|
|
1118
|
+
* MediaStreamTrack.
|
|
1119
|
+
* @property {NoiseCancellationOptions} [noiseCancellationOptions] - This property enables using 3rd party plugins
|
|
1120
|
+
* for noise cancellation. This is a beta feature.
|
|
1121
|
+
*/
|
|
1088
1122
|
/**
|
|
1089
1123
|
* Create {@link LocalTrack} options. Apart from the properties listed here, you can
|
|
1090
1124
|
* also specify any of the <a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints" target="_blank">MediaTrackConstraints</a>
|
|
@@ -1100,17 +1134,14 @@ function createLocalVideoTrack(options) {
|
|
|
1100
1134
|
* See [examples](module-twilio-video.html#.connect) for details.
|
|
1101
1135
|
* @property {string} [name] - The {@link LocalTrack}'s name; by default,
|
|
1102
1136
|
* it is set to the {@link LocalTrack}'s ID.
|
|
1103
|
-
* @property {boolean} [workaroundWebKitBug180748=false] - Only valid for
|
|
1104
|
-
* {@link LocalAudioTrack}s; setting this attempts to workaround WebKit Bug
|
|
1105
|
-
* 180748, where, in Safari, getUserMedia may return a silent audio
|
|
1106
|
-
* MediaStreamTrack.
|
|
1107
1137
|
*/
|
|
1108
1138
|
module.exports = {
|
|
1109
1139
|
audio: createLocalAudioTrack,
|
|
1110
1140
|
video: createLocalVideoTrack
|
|
1111
1141
|
};
|
|
1112
1142
|
|
|
1113
|
-
},{"./util/constants":
|
|
1143
|
+
},{"./util/constants":125}],4:[function(require,module,exports){
|
|
1144
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1114
1145
|
'use strict';
|
|
1115
1146
|
var __assign = (this && this.__assign) || function () {
|
|
1116
1147
|
__assign = Object.assign || function(t) {
|
|
@@ -1182,17 +1213,17 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from) {
|
|
|
1182
1213
|
};
|
|
1183
1214
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1184
1215
|
exports.createLocalTracks = void 0;
|
|
1185
|
-
var
|
|
1186
|
-
var
|
|
1187
|
-
var
|
|
1216
|
+
var noisecancellationimpl_1 = require("./media/track/noisecancellationimpl");
|
|
1217
|
+
var buildLogLevels = require('./util').buildLogLevels;
|
|
1218
|
+
var _a = require('./webrtc'), getUserMedia = _a.getUserMedia, MediaStreamTrack = _a.MediaStreamTrack;
|
|
1219
|
+
var _b = require('./media/track/es5'), LocalAudioTrack = _b.LocalAudioTrack, LocalDataTrack = _b.LocalDataTrack, LocalVideoTrack = _b.LocalVideoTrack;
|
|
1188
1220
|
var Log = require('./util/log');
|
|
1189
|
-
var
|
|
1221
|
+
var _c = require('./util/constants'), DEFAULT_LOG_LEVEL = _c.DEFAULT_LOG_LEVEL, DEFAULT_LOGGER_NAME = _c.DEFAULT_LOGGER_NAME;
|
|
1190
1222
|
var workaround180748 = require('./webaudio/workaround180748');
|
|
1191
1223
|
// This is used to make out which createLocalTracks() call a particular Log
|
|
1192
1224
|
// statement belongs to. Each call to createLocalTracks() increments this
|
|
1193
1225
|
// counter.
|
|
1194
1226
|
var createLocalTrackCalls = 0;
|
|
1195
|
-
;
|
|
1196
1227
|
/**
|
|
1197
1228
|
* Request {@link LocalTrack}s. By default, it requests a
|
|
1198
1229
|
* {@link LocalAudioTrack} and a {@link LocalVideoTrack}.
|
|
@@ -1252,7 +1283,8 @@ var createLocalTrackCalls = 0;
|
|
|
1252
1283
|
*/
|
|
1253
1284
|
function createLocalTracks(options) {
|
|
1254
1285
|
return __awaiter(this, void 0, void 0, function () {
|
|
1255
|
-
var isAudioVideoAbsent, fullOptions, logComponentName, logLevels, log, localTrackOptions, extraLocalTrackOptions, mediaStreamConstraints, workaroundWebKitBug180748, mediaStream, mediaStreamTracks, error_1;
|
|
1286
|
+
var isAudioVideoAbsent, fullOptions, logComponentName, logLevels, log, localTrackOptions, extraLocalTrackOptions, noiseCancellationOptions, mediaStreamConstraints, workaroundWebKitBug180748, mediaStream, mediaStreamTracks, error_1;
|
|
1287
|
+
var _this = this;
|
|
1256
1288
|
return __generator(this, function (_a) {
|
|
1257
1289
|
switch (_a.label) {
|
|
1258
1290
|
case 0:
|
|
@@ -1295,6 +1327,10 @@ function createLocalTracks(options) {
|
|
|
1295
1327
|
if (typeof fullOptions.audio === 'object' && typeof fullOptions.audio.workaroundWebKitBug1208516 === 'boolean') {
|
|
1296
1328
|
extraLocalTrackOptions.audio.workaroundWebKitBug1208516 = fullOptions.audio.workaroundWebKitBug1208516;
|
|
1297
1329
|
}
|
|
1330
|
+
if (typeof fullOptions.audio === 'object' && 'noiseCancellationOptions' in fullOptions.audio) {
|
|
1331
|
+
noiseCancellationOptions = fullOptions.audio.noiseCancellationOptions;
|
|
1332
|
+
delete fullOptions.audio.noiseCancellationOptions;
|
|
1333
|
+
}
|
|
1298
1334
|
if (typeof fullOptions.video === 'object' && typeof fullOptions.video.workaroundWebKitBug1208516 === 'boolean') {
|
|
1299
1335
|
extraLocalTrackOptions.video.workaroundWebKitBug1208516 = fullOptions.video.workaroundWebKitBug1208516;
|
|
1300
1336
|
}
|
|
@@ -1311,27 +1347,46 @@ function createLocalTracks(options) {
|
|
|
1311
1347
|
workaroundWebKitBug180748 = typeof fullOptions.audio === 'object' && fullOptions.audio.workaroundWebKitBug180748;
|
|
1312
1348
|
_a.label = 1;
|
|
1313
1349
|
case 1:
|
|
1314
|
-
_a.trys.push([1,
|
|
1350
|
+
_a.trys.push([1, 4, , 5]);
|
|
1315
1351
|
return [4 /*yield*/, (workaroundWebKitBug180748
|
|
1316
1352
|
? workaround180748(log, fullOptions.getUserMedia, mediaStreamConstraints)
|
|
1317
1353
|
: fullOptions.getUserMedia(mediaStreamConstraints))];
|
|
1318
1354
|
case 2:
|
|
1319
1355
|
mediaStream = _a.sent();
|
|
1320
1356
|
mediaStreamTracks = __spreadArray(__spreadArray([], __read(mediaStream.getAudioTracks())), __read(mediaStream.getVideoTracks()));
|
|
1321
|
-
log.info('Call to getUserMedia successful; got
|
|
1322
|
-
return [
|
|
1323
|
-
|
|
1357
|
+
log.info('Call to getUserMedia successful; got tracks:', mediaStreamTracks);
|
|
1358
|
+
return [4 /*yield*/, Promise.all(mediaStreamTracks.map(function (mediaStreamTrack) { return __awaiter(_this, void 0, void 0, function () {
|
|
1359
|
+
var _a, cleanTrack, noiseCancellation;
|
|
1360
|
+
return __generator(this, function (_b) {
|
|
1361
|
+
switch (_b.label) {
|
|
1362
|
+
case 0:
|
|
1363
|
+
if (!(mediaStreamTrack.kind === 'audio' && noiseCancellationOptions)) return [3 /*break*/, 2];
|
|
1364
|
+
return [4 /*yield*/, noisecancellationimpl_1.applyNoiseCancellation(mediaStreamTrack, noiseCancellationOptions, log)];
|
|
1365
|
+
case 1:
|
|
1366
|
+
_a = _b.sent(), cleanTrack = _a.cleanTrack, noiseCancellation = _a.noiseCancellation;
|
|
1367
|
+
return [2 /*return*/, new localTrackOptions.LocalAudioTrack(cleanTrack, __assign(__assign(__assign({}, extraLocalTrackOptions.audio), localTrackOptions), { noiseCancellation: noiseCancellation }))];
|
|
1368
|
+
case 2:
|
|
1369
|
+
if (mediaStreamTrack.kind === 'audio') {
|
|
1370
|
+
return [2 /*return*/, new localTrackOptions.LocalAudioTrack(mediaStreamTrack, __assign(__assign({}, extraLocalTrackOptions.audio), localTrackOptions))];
|
|
1371
|
+
}
|
|
1372
|
+
_b.label = 3;
|
|
1373
|
+
case 3: return [2 /*return*/, new localTrackOptions.LocalVideoTrack(mediaStreamTrack, __assign(__assign({}, extraLocalTrackOptions.video), localTrackOptions))];
|
|
1374
|
+
}
|
|
1375
|
+
});
|
|
1376
|
+
}); }))];
|
|
1377
|
+
case 3: return [2 /*return*/, _a.sent()];
|
|
1378
|
+
case 4:
|
|
1324
1379
|
error_1 = _a.sent();
|
|
1325
1380
|
log.warn('Call to getUserMedia failed:', error_1);
|
|
1326
1381
|
throw error_1;
|
|
1327
|
-
case
|
|
1382
|
+
case 5: return [2 /*return*/];
|
|
1328
1383
|
}
|
|
1329
1384
|
});
|
|
1330
1385
|
});
|
|
1331
1386
|
}
|
|
1332
1387
|
exports.createLocalTracks = createLocalTracks;
|
|
1333
1388
|
|
|
1334
|
-
},{"./media/track/es5":
|
|
1389
|
+
},{"./media/track/es5":15,"./media/track/noisecancellationimpl":29,"./util":131,"./util/constants":125,"./util/log":135,"./webaudio/workaround180748":154,"./webrtc":157}],5:[function(require,module,exports){
|
|
1335
1390
|
'use strict';
|
|
1336
1391
|
var __extends = (this && this.__extends) || (function () {
|
|
1337
1392
|
var extendStatics = function (d, b) {
|
|
@@ -1530,7 +1585,7 @@ var DataTrackSender = /** @class */ (function (_super) {
|
|
|
1530
1585
|
}(DataTrackTransceiver));
|
|
1531
1586
|
module.exports = DataTrackSender;
|
|
1532
1587
|
|
|
1533
|
-
},{"../util":
|
|
1588
|
+
},{"../util":131,"./transceiver":7}],7:[function(require,module,exports){
|
|
1534
1589
|
'use strict';
|
|
1535
1590
|
var __extends = (this && this.__extends) || (function () {
|
|
1536
1591
|
var extendStatics = function (d, b) {
|
|
@@ -1590,7 +1645,7 @@ var DataTrackTransceiver = /** @class */ (function (_super) {
|
|
|
1590
1645
|
}(TrackTransceiver));
|
|
1591
1646
|
module.exports = DataTrackTransceiver;
|
|
1592
1647
|
|
|
1593
|
-
},{"../transceiver":
|
|
1648
|
+
},{"../transceiver":119}],8:[function(require,module,exports){
|
|
1594
1649
|
'use strict';
|
|
1595
1650
|
var __extends = (this && this.__extends) || (function () {
|
|
1596
1651
|
var extendStatics = function (d, b) {
|
|
@@ -1687,7 +1742,18 @@ var DataTransport = /** @class */ (function (_super) {
|
|
|
1687
1742
|
*/
|
|
1688
1743
|
module.exports = DataTransport;
|
|
1689
1744
|
|
|
1690
|
-
},{"events":
|
|
1745
|
+
},{"events":173}],9:[function(require,module,exports){
|
|
1746
|
+
// typescript has an issue that it compiles await import into require when module is set to commonjs
|
|
1747
|
+
// https://github.com/microsoft/TypeScript/issues/43329
|
|
1748
|
+
|
|
1749
|
+
// To workaround this issue we need following code to be not compiled by typescript.
|
|
1750
|
+
|
|
1751
|
+
'use strict';
|
|
1752
|
+
module.exports = function(module) {
|
|
1753
|
+
return import(/* webpackIgnore: true */ module);
|
|
1754
|
+
};
|
|
1755
|
+
|
|
1756
|
+
},{}],10:[function(require,module,exports){
|
|
1691
1757
|
'use strict';
|
|
1692
1758
|
var __extends = (this && this.__extends) || (function () {
|
|
1693
1759
|
var extendStatics = function (d, b) {
|
|
@@ -1785,13 +1851,13 @@ var EncodingParametersImpl = /** @class */ (function (_super) {
|
|
|
1785
1851
|
*/
|
|
1786
1852
|
module.exports = EncodingParametersImpl;
|
|
1787
1853
|
|
|
1788
|
-
},{"events":
|
|
1854
|
+
},{"events":173}],11:[function(require,module,exports){
|
|
1789
1855
|
'use strict';
|
|
1790
1856
|
var EventEmitter = require('events').EventEmitter;
|
|
1791
1857
|
var hidePrivateAndCertainPublicPropertiesInClass = require('./util').hidePrivateAndCertainPublicPropertiesInClass;
|
|
1792
1858
|
module.exports = hidePrivateAndCertainPublicPropertiesInClass(EventEmitter, ['domain']);
|
|
1793
1859
|
|
|
1794
|
-
},{"./util":
|
|
1860
|
+
},{"./util":131,"events":173}],12:[function(require,module,exports){
|
|
1795
1861
|
'use strict';
|
|
1796
1862
|
var __assign = (this && this.__assign) || function () {
|
|
1797
1863
|
__assign = Object.assign || function(t) {
|
|
@@ -1862,10 +1928,10 @@ module.exports = {
|
|
|
1862
1928
|
Logger: Logger,
|
|
1863
1929
|
LocalAudioTrack: LocalAudioTrack,
|
|
1864
1930
|
LocalVideoTrack: LocalVideoTrack,
|
|
1865
|
-
LocalDataTrack: LocalDataTrack
|
|
1931
|
+
LocalDataTrack: LocalDataTrack,
|
|
1866
1932
|
};
|
|
1867
1933
|
|
|
1868
|
-
},{"../package.json":
|
|
1934
|
+
},{"../package.json":174,"./connect":2,"./createlocaltrack":3,"./createlocaltracks":4,"./media/track/es5":15,"./preflight/preflighttest":51,"./util/support":144,"./vendor/loglevel":151}],13:[function(require,module,exports){
|
|
1869
1935
|
'use strict';
|
|
1870
1936
|
var __extends = (this && this.__extends) || (function () {
|
|
1871
1937
|
var extendStatics = function (d, b) {
|
|
@@ -2002,7 +2068,10 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2002
2068
|
* @returns {void}
|
|
2003
2069
|
*/
|
|
2004
2070
|
LocalParticipant.prototype._addLocalTrack = function (track, priority) {
|
|
2005
|
-
|
|
2071
|
+
var _a;
|
|
2072
|
+
// check if track has noise cancellation enabled.
|
|
2073
|
+
var vendor = (_a = track.noiseCancellation) === null || _a === void 0 ? void 0 : _a.vendor;
|
|
2074
|
+
this._signaling.addTrack(track._trackSender, track.name, priority, vendor);
|
|
2006
2075
|
this._log.info("Added a new " + trackClass(track, true) + ":", track.id);
|
|
2007
2076
|
this._log.debug(trackClass(track, true) + ":", track);
|
|
2008
2077
|
};
|
|
@@ -2290,6 +2359,12 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2290
2359
|
catch (error) {
|
|
2291
2360
|
return Promise.reject(error);
|
|
2292
2361
|
}
|
|
2362
|
+
var noiseCancellation = localTrack.noiseCancellation;
|
|
2363
|
+
var allowedAudioProcessors = this._signaling.audioProcessors;
|
|
2364
|
+
if (noiseCancellation && !allowedAudioProcessors.includes(noiseCancellation.vendor)) {
|
|
2365
|
+
this._log.warn(noiseCancellation.vendor + " is not supported in this room. disabling it permanently");
|
|
2366
|
+
noiseCancellation.disablePermanently();
|
|
2367
|
+
}
|
|
2293
2368
|
var priorityValues = Object.values(trackPriority);
|
|
2294
2369
|
if (!priorityValues.includes(options.priority)) {
|
|
2295
2370
|
// eslint-disable-next-line new-cap
|
|
@@ -2568,7 +2643,7 @@ function getTrackPublication(trackPublications, track) {
|
|
|
2568
2643
|
}
|
|
2569
2644
|
module.exports = LocalParticipant;
|
|
2570
2645
|
|
|
2571
|
-
},{"./media/track/es5":
|
|
2646
|
+
},{"./media/track/es5":15,"./media/track/localaudiotrackpublication":21,"./media/track/localdatatrackpublication":23,"./media/track/localvideotrackpublication":27,"./participant":46,"./util":131,"./util/constants":125,"./util/validate":149,"./webrtc":157}],14:[function(require,module,exports){
|
|
2572
2647
|
'use strict';
|
|
2573
2648
|
var __extends = (this && this.__extends) || (function () {
|
|
2574
2649
|
var extendStatics = function (d, b) {
|
|
@@ -2734,7 +2809,7 @@ var AudioTrack = /** @class */ (function (_super) {
|
|
|
2734
2809
|
*/
|
|
2735
2810
|
module.exports = AudioTrack;
|
|
2736
2811
|
|
|
2737
|
-
},{"./mediatrack":
|
|
2812
|
+
},{"./mediatrack":28}],15:[function(require,module,exports){
|
|
2738
2813
|
'use strict';
|
|
2739
2814
|
module.exports = {
|
|
2740
2815
|
LocalAudioTrack: require('./localaudiotrack'),
|
|
@@ -2742,7 +2817,7 @@ module.exports = {
|
|
|
2742
2817
|
LocalDataTrack: require('./localdatatrack')
|
|
2743
2818
|
};
|
|
2744
2819
|
|
|
2745
|
-
},{"./localaudiotrack":
|
|
2820
|
+
},{"./localaudiotrack":16,"./localdatatrack":17,"./localvideotrack":18}],16:[function(require,module,exports){
|
|
2746
2821
|
// eslint-disable-next-line no-warning-comments
|
|
2747
2822
|
// TODO(mroberts): Remove this when we go to the next major version. This is
|
|
2748
2823
|
// only in place so that we can support ES6 classes without requiring `new`.
|
|
@@ -2757,7 +2832,7 @@ function LocalAudioTrack(mediaStreamTrack, options) {
|
|
|
2757
2832
|
inherits(LocalAudioTrack, LocalAudioTrackClass);
|
|
2758
2833
|
module.exports = LocalAudioTrack;
|
|
2759
2834
|
|
|
2760
|
-
},{"../../../vendor/inherits":
|
|
2835
|
+
},{"../../../vendor/inherits":150,"../localaudiotrack":20}],17:[function(require,module,exports){
|
|
2761
2836
|
// eslint-disable-next-line no-warning-comments
|
|
2762
2837
|
// TODO(mroberts): Remove this when we go to the next major version. This is
|
|
2763
2838
|
// only in place so that we can support ES6 classes without requiring `new`.
|
|
@@ -2772,7 +2847,7 @@ function LocalDataTrack(options) {
|
|
|
2772
2847
|
inherits(LocalDataTrack, LocalDataTrackClass);
|
|
2773
2848
|
module.exports = LocalDataTrack;
|
|
2774
2849
|
|
|
2775
|
-
},{"../../../vendor/inherits":
|
|
2850
|
+
},{"../../../vendor/inherits":150,"../localdatatrack":22}],18:[function(require,module,exports){
|
|
2776
2851
|
// eslint-disable-next-line no-warning-comments
|
|
2777
2852
|
// TODO(mroberts): Remove this when we go to the next major version. This is
|
|
2778
2853
|
// only in place so that we can support ES6 classes without requiring `new`.
|
|
@@ -2787,7 +2862,7 @@ function LocalVideoTrack(mediaStreamTrack, options) {
|
|
|
2787
2862
|
inherits(LocalVideoTrack, LocalVideoTrackClass);
|
|
2788
2863
|
module.exports = LocalVideoTrack;
|
|
2789
2864
|
|
|
2790
|
-
},{"../../../vendor/inherits":
|
|
2865
|
+
},{"../../../vendor/inherits":150,"../localvideotrack":26}],19:[function(require,module,exports){
|
|
2791
2866
|
'use strict';
|
|
2792
2867
|
var __extends = (this && this.__extends) || (function () {
|
|
2793
2868
|
var extendStatics = function (d, b) {
|
|
@@ -2899,7 +2974,7 @@ var Track = /** @class */ (function (_super) {
|
|
|
2899
2974
|
*/
|
|
2900
2975
|
module.exports = Track;
|
|
2901
2976
|
|
|
2902
|
-
},{"../../eventemitter":
|
|
2977
|
+
},{"../../eventemitter":11,"../../util":131,"../../util/constants":125,"../../util/log":135}],20:[function(require,module,exports){
|
|
2903
2978
|
'use strict';
|
|
2904
2979
|
var __extends = (this && this.__extends) || (function () {
|
|
2905
2980
|
var extendStatics = function (d, b) {
|
|
@@ -2929,6 +3004,9 @@ var LocalMediaAudioTrack = mixinLocalMediaTrack(AudioTrack);
|
|
|
2929
3004
|
* @property {Track.ID} id - The {@link LocalAudioTrack}'s ID
|
|
2930
3005
|
* @property {boolean} isStopped - Whether or not the {@link LocalAudioTrack} is
|
|
2931
3006
|
* stopped
|
|
3007
|
+
* @property {NoiseCancellation?} noiseCancellation - When a LocalAudioTrack is created
|
|
3008
|
+
* with {@link NoiseCancellationOptions}, this property provides interface
|
|
3009
|
+
* to enable or disable the noise cancellation at runtime.
|
|
2932
3010
|
* @emits LocalAudioTrack#disabled
|
|
2933
3011
|
* @emits LocalAudioTrack#enabled
|
|
2934
3012
|
* @emits LocalAudioTrack#started
|
|
@@ -2942,7 +3020,17 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
2942
3020
|
* @param {LocalTrackOptions} [options] - {@link LocalTrack} options
|
|
2943
3021
|
*/
|
|
2944
3022
|
function LocalAudioTrack(mediaStreamTrack, options) {
|
|
2945
|
-
|
|
3023
|
+
var _this = this;
|
|
3024
|
+
var noiseCancellation = (options === null || options === void 0 ? void 0 : options.noiseCancellation) || null;
|
|
3025
|
+
_this = _super.call(this, mediaStreamTrack, options) || this;
|
|
3026
|
+
Object.defineProperties(_this, {
|
|
3027
|
+
noiseCancellation: {
|
|
3028
|
+
enumerable: true,
|
|
3029
|
+
value: noiseCancellation,
|
|
3030
|
+
writable: false
|
|
3031
|
+
},
|
|
3032
|
+
});
|
|
3033
|
+
return _this;
|
|
2946
3034
|
}
|
|
2947
3035
|
LocalAudioTrack.prototype.toString = function () {
|
|
2948
3036
|
return "[LocalAudioTrack #" + this._instanceId + ": " + this.id + "]";
|
|
@@ -2958,6 +3046,19 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
2958
3046
|
LocalAudioTrack.prototype._end = function () {
|
|
2959
3047
|
return _super.prototype._end.apply(this, arguments);
|
|
2960
3048
|
};
|
|
3049
|
+
/**
|
|
3050
|
+
* @private
|
|
3051
|
+
*/
|
|
3052
|
+
LocalAudioTrack.prototype._reacquireTrack = function (constraints) {
|
|
3053
|
+
var _this = this;
|
|
3054
|
+
this._log.debug('_reacquireTrack: ', constraints);
|
|
3055
|
+
if (this.noiseCancellation) {
|
|
3056
|
+
return this.noiseCancellation.reacquireTrack(function () {
|
|
3057
|
+
return _super.prototype._reacquireTrack.call(_this, constraints);
|
|
3058
|
+
});
|
|
3059
|
+
}
|
|
3060
|
+
return _super.prototype._reacquireTrack.call(this, constraints);
|
|
3061
|
+
};
|
|
2961
3062
|
/**
|
|
2962
3063
|
* Disable the {@link LocalAudioTrack}. This is effectively "mute".
|
|
2963
3064
|
* @returns {this}
|
|
@@ -3056,7 +3157,7 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
3056
3157
|
*/
|
|
3057
3158
|
module.exports = LocalAudioTrack;
|
|
3058
3159
|
|
|
3059
|
-
},{"./audiotrack":
|
|
3160
|
+
},{"./audiotrack":14,"./localmediatrack":24}],21:[function(require,module,exports){
|
|
3060
3161
|
'use strict';
|
|
3061
3162
|
var __extends = (this && this.__extends) || (function () {
|
|
3062
3163
|
var extendStatics = function (d, b) {
|
|
@@ -3102,7 +3203,7 @@ var LocalAudioTrackPublication = /** @class */ (function (_super) {
|
|
|
3102
3203
|
}(LocalTrackPublication));
|
|
3103
3204
|
module.exports = LocalAudioTrackPublication;
|
|
3104
3205
|
|
|
3105
|
-
},{"./localtrackpublication":
|
|
3206
|
+
},{"./localtrackpublication":25}],22:[function(require,module,exports){
|
|
3106
3207
|
'use strict';
|
|
3107
3208
|
var __extends = (this && this.__extends) || (function () {
|
|
3108
3209
|
var extendStatics = function (d, b) {
|
|
@@ -3240,7 +3341,7 @@ var LocalDataTrack = /** @class */ (function (_super) {
|
|
|
3240
3341
|
*/
|
|
3241
3342
|
module.exports = LocalDataTrack;
|
|
3242
3343
|
|
|
3243
|
-
},{"../../data/sender":6,"./":
|
|
3344
|
+
},{"../../data/sender":6,"./":19}],23:[function(require,module,exports){
|
|
3244
3345
|
'use strict';
|
|
3245
3346
|
var __extends = (this && this.__extends) || (function () {
|
|
3246
3347
|
var extendStatics = function (d, b) {
|
|
@@ -3286,7 +3387,7 @@ var LocalDataTrackPublication = /** @class */ (function (_super) {
|
|
|
3286
3387
|
}(LocalTrackPublication));
|
|
3287
3388
|
module.exports = LocalDataTrackPublication;
|
|
3288
3389
|
|
|
3289
|
-
},{"./localtrackpublication":
|
|
3390
|
+
},{"./localtrackpublication":25}],24:[function(require,module,exports){
|
|
3290
3391
|
/* eslint new-cap:0 */
|
|
3291
3392
|
'use strict';
|
|
3292
3393
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -3644,7 +3745,7 @@ function restartWhenInadvertentlyStopped(localMediaTrack) {
|
|
|
3644
3745
|
}
|
|
3645
3746
|
module.exports = mixinLocalMediaTrack;
|
|
3646
3747
|
|
|
3647
|
-
},{"../../util":
|
|
3748
|
+
},{"../../util":131,"../../util/constants":125,"../../util/detectsilentaudio":126,"../../util/detectsilentvideo":127,"../../util/documentvisibilitymonitor.js":128,"../../util/localmediarestartdeferreds":134,"../../webaudio/workaround180748":154,"../../webrtc":157,"../../webrtc/util":170,"./sender":39}],25:[function(require,module,exports){
|
|
3648
3749
|
/* eslint new-cap:0 */
|
|
3649
3750
|
'use strict';
|
|
3650
3751
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -3810,7 +3911,7 @@ var LocalTrackPublication = /** @class */ (function (_super) {
|
|
|
3810
3911
|
*/
|
|
3811
3912
|
module.exports = LocalTrackPublication;
|
|
3812
3913
|
|
|
3813
|
-
},{"../../util/constants":
|
|
3914
|
+
},{"../../util/constants":125,"./trackpublication":40}],26:[function(require,module,exports){
|
|
3814
3915
|
'use strict';
|
|
3815
3916
|
var __extends = (this && this.__extends) || (function () {
|
|
3816
3917
|
var extendStatics = function (d, b) {
|
|
@@ -4157,7 +4258,7 @@ function workaroundSilentLocalVideo(localVideoTrack, doc) {
|
|
|
4157
4258
|
*/
|
|
4158
4259
|
module.exports = LocalVideoTrack;
|
|
4159
4260
|
|
|
4160
|
-
},{"../../util":
|
|
4261
|
+
},{"../../util":131,"../../util/detectsilentvideo":127,"../../webrtc/util":170,"./localmediatrack":24,"./videotrack":43}],27:[function(require,module,exports){
|
|
4161
4262
|
'use strict';
|
|
4162
4263
|
var __extends = (this && this.__extends) || (function () {
|
|
4163
4264
|
var extendStatics = function (d, b) {
|
|
@@ -4203,7 +4304,7 @@ var LocalVideoTrackPublication = /** @class */ (function (_super) {
|
|
|
4203
4304
|
}(LocalTrackPublication));
|
|
4204
4305
|
module.exports = LocalVideoTrackPublication;
|
|
4205
4306
|
|
|
4206
|
-
},{"./localtrackpublication":
|
|
4307
|
+
},{"./localtrackpublication":25}],28:[function(require,module,exports){
|
|
4207
4308
|
'use strict';
|
|
4208
4309
|
var __extends = (this && this.__extends) || (function () {
|
|
4209
4310
|
var extendStatics = function (d, b) {
|
|
@@ -4567,7 +4668,206 @@ function shimMediaElement(el, onUnintentionallyPaused) {
|
|
|
4567
4668
|
}
|
|
4568
4669
|
module.exports = MediaTrack;
|
|
4569
4670
|
|
|
4570
|
-
},{"../../util":
|
|
4671
|
+
},{"../../util":131,"../../util/localmediarestartdeferreds":134,"../../webrtc":157,"../../webrtc/util":170,"./":19}],29:[function(require,module,exports){
|
|
4672
|
+
'use strict';
|
|
4673
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4674
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4675
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4676
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
4677
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
4678
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
4679
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4680
|
+
});
|
|
4681
|
+
};
|
|
4682
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
4683
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
4684
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
4685
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
4686
|
+
function step(op) {
|
|
4687
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
4688
|
+
while (_) try {
|
|
4689
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
4690
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
4691
|
+
switch (op[0]) {
|
|
4692
|
+
case 0: case 1: t = op; break;
|
|
4693
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
4694
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
4695
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
4696
|
+
default:
|
|
4697
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
4698
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
4699
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
4700
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
4701
|
+
if (t[2]) _.ops.pop();
|
|
4702
|
+
_.trys.pop(); continue;
|
|
4703
|
+
}
|
|
4704
|
+
op = body.call(thisArg, _);
|
|
4705
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
4706
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
4707
|
+
}
|
|
4708
|
+
};
|
|
4709
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4710
|
+
exports.applyNoiseCancellation = exports.NoiseCancellationImpl = void 0;
|
|
4711
|
+
var noisecancellationadapter_1 = require("../../noisecancellationadapter");
|
|
4712
|
+
var Log = require('../../util/log');
|
|
4713
|
+
/**
|
|
4714
|
+
* {@link NoiseCancellation} interface provides methods to control noise cancellation at runtime.
|
|
4715
|
+
* This interface is exposed on {@link LocalAudioTrack} property `noiseCancellation`. It is available only when
|
|
4716
|
+
* {@link NoiseCancellationOptions} are specified when creating a {@link LocalAudioTrack}
|
|
4717
|
+
* @alias NoiseCancellation
|
|
4718
|
+
* @interface
|
|
4719
|
+
*
|
|
4720
|
+
* @example
|
|
4721
|
+
* const { connect, createLocalAudioTrack } = require('twilio-video');
|
|
4722
|
+
*
|
|
4723
|
+
* // create a local audio track and have it use
|
|
4724
|
+
* // @twilio/krisp-audio-plugin for noise cancellation processing.
|
|
4725
|
+
* const localAudioTrack = await Video.createLocalAudioTrack({
|
|
4726
|
+
* noiseCancellationOptions: {
|
|
4727
|
+
* vendor: 'krisp',
|
|
4728
|
+
* sdkAssetsPath: '/twilio-krisp-audio-plugin/1.0.0/dist'
|
|
4729
|
+
* }
|
|
4730
|
+
* });
|
|
4731
|
+
*
|
|
4732
|
+
* // publish the track to a room
|
|
4733
|
+
* const room = await connect( token, {
|
|
4734
|
+
* tracks: [localAudioTrack]
|
|
4735
|
+
* // ... any other connect options
|
|
4736
|
+
* });
|
|
4737
|
+
*
|
|
4738
|
+
* // you can enable/disable noise cancellation at runtime
|
|
4739
|
+
* // using noiseCancellation interface exposed by localAudioTrack
|
|
4740
|
+
* function updateNoiseCancellation(enable: boolean) {
|
|
4741
|
+
* const noiseCancellation = localAudioTrack.noiseCancellation;
|
|
4742
|
+
*
|
|
4743
|
+
* if (noiseCancellation) {
|
|
4744
|
+
* enable ? noiseCancellation.enable() : noiseCancellation.disable();
|
|
4745
|
+
* }
|
|
4746
|
+
* }
|
|
4747
|
+
*/
|
|
4748
|
+
var NoiseCancellationImpl = /** @class */ (function () {
|
|
4749
|
+
function NoiseCancellationImpl(processor, originalTrack) {
|
|
4750
|
+
this._processor = processor;
|
|
4751
|
+
this._sourceTrack = originalTrack;
|
|
4752
|
+
this._disabledPermanent = false;
|
|
4753
|
+
}
|
|
4754
|
+
Object.defineProperty(NoiseCancellationImpl.prototype, "vendor", {
|
|
4755
|
+
/**
|
|
4756
|
+
* Identifies the vendor
|
|
4757
|
+
* @type {NoiseCancellationVendor}
|
|
4758
|
+
*/
|
|
4759
|
+
get: function () {
|
|
4760
|
+
return this._processor.vendor;
|
|
4761
|
+
},
|
|
4762
|
+
enumerable: false,
|
|
4763
|
+
configurable: true
|
|
4764
|
+
});
|
|
4765
|
+
Object.defineProperty(NoiseCancellationImpl.prototype, "sourceTrack", {
|
|
4766
|
+
/**
|
|
4767
|
+
* Underlying MediaStreamTrack
|
|
4768
|
+
* @type {MediaStreamTrack}
|
|
4769
|
+
*/
|
|
4770
|
+
get: function () {
|
|
4771
|
+
return this._sourceTrack;
|
|
4772
|
+
},
|
|
4773
|
+
enumerable: false,
|
|
4774
|
+
configurable: true
|
|
4775
|
+
});
|
|
4776
|
+
Object.defineProperty(NoiseCancellationImpl.prototype, "isEnabled", {
|
|
4777
|
+
/**
|
|
4778
|
+
* Set to true if noise cancellation is currently enabled
|
|
4779
|
+
* @type {boolean}
|
|
4780
|
+
*/
|
|
4781
|
+
get: function () {
|
|
4782
|
+
return this._processor.isEnabled();
|
|
4783
|
+
},
|
|
4784
|
+
enumerable: false,
|
|
4785
|
+
configurable: true
|
|
4786
|
+
});
|
|
4787
|
+
/**
|
|
4788
|
+
* Enables noise cancellation
|
|
4789
|
+
* @returns {Promise<void>} a promise that resolves when operation is complete.
|
|
4790
|
+
*/
|
|
4791
|
+
NoiseCancellationImpl.prototype.enable = function () {
|
|
4792
|
+
if (this._disabledPermanent) {
|
|
4793
|
+
throw new Error(this.vendor + " noise cancellation is disabled permanently for this track");
|
|
4794
|
+
}
|
|
4795
|
+
this._processor.enable();
|
|
4796
|
+
return Promise.resolve();
|
|
4797
|
+
};
|
|
4798
|
+
/**
|
|
4799
|
+
* Disables noise cancellation
|
|
4800
|
+
* @returns {Promise<void>} a promise that resolves when operation is complete.
|
|
4801
|
+
*/
|
|
4802
|
+
NoiseCancellationImpl.prototype.disable = function () {
|
|
4803
|
+
this._processor.disable();
|
|
4804
|
+
return Promise.resolve();
|
|
4805
|
+
};
|
|
4806
|
+
/**
|
|
4807
|
+
* @private
|
|
4808
|
+
*/
|
|
4809
|
+
NoiseCancellationImpl.prototype.reacquireTrack = function (reacquire) {
|
|
4810
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4811
|
+
var processorWasEnabled, track, processedTrack;
|
|
4812
|
+
return __generator(this, function (_a) {
|
|
4813
|
+
switch (_a.label) {
|
|
4814
|
+
case 0:
|
|
4815
|
+
processorWasEnabled = this._processor.isEnabled();
|
|
4816
|
+
this._processor.disconnect();
|
|
4817
|
+
return [4 /*yield*/, reacquire()];
|
|
4818
|
+
case 1:
|
|
4819
|
+
track = _a.sent();
|
|
4820
|
+
this._sourceTrack = track;
|
|
4821
|
+
return [4 /*yield*/, this._processor.connect(track)];
|
|
4822
|
+
case 2:
|
|
4823
|
+
processedTrack = _a.sent();
|
|
4824
|
+
if (processorWasEnabled) {
|
|
4825
|
+
this._processor.enable();
|
|
4826
|
+
}
|
|
4827
|
+
else {
|
|
4828
|
+
this._processor.disable();
|
|
4829
|
+
}
|
|
4830
|
+
return [2 /*return*/, processedTrack];
|
|
4831
|
+
}
|
|
4832
|
+
});
|
|
4833
|
+
});
|
|
4834
|
+
};
|
|
4835
|
+
/**
|
|
4836
|
+
* @private
|
|
4837
|
+
*/
|
|
4838
|
+
NoiseCancellationImpl.prototype.disablePermanently = function () {
|
|
4839
|
+
this._disabledPermanent = true;
|
|
4840
|
+
return this.disable();
|
|
4841
|
+
};
|
|
4842
|
+
return NoiseCancellationImpl;
|
|
4843
|
+
}());
|
|
4844
|
+
exports.NoiseCancellationImpl = NoiseCancellationImpl;
|
|
4845
|
+
function applyNoiseCancellation(mediaStreamTrack, noiseCancellationOptions, log) {
|
|
4846
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4847
|
+
var processor, cleanTrack, noiseCancellation, ex_1;
|
|
4848
|
+
return __generator(this, function (_a) {
|
|
4849
|
+
switch (_a.label) {
|
|
4850
|
+
case 0:
|
|
4851
|
+
_a.trys.push([0, 2, , 3]);
|
|
4852
|
+
return [4 /*yield*/, noisecancellationadapter_1.createNoiseCancellationAudioProcessor(noiseCancellationOptions, log)];
|
|
4853
|
+
case 1:
|
|
4854
|
+
processor = _a.sent();
|
|
4855
|
+
cleanTrack = processor.connect(mediaStreamTrack);
|
|
4856
|
+
noiseCancellation = new NoiseCancellationImpl(processor, mediaStreamTrack);
|
|
4857
|
+
return [2 /*return*/, { cleanTrack: cleanTrack, noiseCancellation: noiseCancellation }];
|
|
4858
|
+
case 2:
|
|
4859
|
+
ex_1 = _a.sent();
|
|
4860
|
+
// in case of failures to load noise cancellation library just return original media stream.
|
|
4861
|
+
log.warn("Failed to create noise cancellation. Returning normal audio track: " + ex_1);
|
|
4862
|
+
return [2 /*return*/, { cleanTrack: mediaStreamTrack }];
|
|
4863
|
+
case 3: return [2 /*return*/];
|
|
4864
|
+
}
|
|
4865
|
+
});
|
|
4866
|
+
});
|
|
4867
|
+
}
|
|
4868
|
+
exports.applyNoiseCancellation = applyNoiseCancellation;
|
|
4869
|
+
|
|
4870
|
+
},{"../../noisecancellationadapter":45,"../../util/log":135}],30:[function(require,module,exports){
|
|
4571
4871
|
'use strict';
|
|
4572
4872
|
var __extends = (this && this.__extends) || (function () {
|
|
4573
4873
|
var extendStatics = function (d, b) {
|
|
@@ -4603,7 +4903,7 @@ var MediaTrackReceiver = /** @class */ (function (_super) {
|
|
|
4603
4903
|
}(MediaTrackTransceiver));
|
|
4604
4904
|
module.exports = MediaTrackReceiver;
|
|
4605
4905
|
|
|
4606
|
-
},{"./transceiver":
|
|
4906
|
+
},{"./transceiver":41}],31:[function(require,module,exports){
|
|
4607
4907
|
'use strict';
|
|
4608
4908
|
var __extends = (this && this.__extends) || (function () {
|
|
4609
4909
|
var extendStatics = function (d, b) {
|
|
@@ -4700,7 +5000,7 @@ var RemoteAudioTrack = /** @class */ (function (_super) {
|
|
|
4700
5000
|
*/
|
|
4701
5001
|
module.exports = RemoteAudioTrack;
|
|
4702
5002
|
|
|
4703
|
-
},{"./audiotrack":
|
|
5003
|
+
},{"./audiotrack":14,"./remotemediatrack":35}],32:[function(require,module,exports){
|
|
4704
5004
|
'use strict';
|
|
4705
5005
|
var __extends = (this && this.__extends) || (function () {
|
|
4706
5006
|
var extendStatics = function (d, b) {
|
|
@@ -4772,7 +5072,7 @@ var RemoteAudioTrackPublication = /** @class */ (function (_super) {
|
|
|
4772
5072
|
*/
|
|
4773
5073
|
module.exports = RemoteAudioTrackPublication;
|
|
4774
5074
|
|
|
4775
|
-
},{"./remotetrackpublication":
|
|
5075
|
+
},{"./remotetrackpublication":36}],33:[function(require,module,exports){
|
|
4776
5076
|
'use strict';
|
|
4777
5077
|
var __extends = (this && this.__extends) || (function () {
|
|
4778
5078
|
var extendStatics = function (d, b) {
|
|
@@ -4959,7 +5259,7 @@ var RemoteDataTrack = /** @class */ (function (_super) {
|
|
|
4959
5259
|
*/
|
|
4960
5260
|
module.exports = RemoteDataTrack;
|
|
4961
5261
|
|
|
4962
|
-
},{"../../util/constants":
|
|
5262
|
+
},{"../../util/constants":125,"./":19}],34:[function(require,module,exports){
|
|
4963
5263
|
'use strict';
|
|
4964
5264
|
var __extends = (this && this.__extends) || (function () {
|
|
4965
5265
|
var extendStatics = function (d, b) {
|
|
@@ -5021,7 +5321,7 @@ var RemoteDataTrackPublication = /** @class */ (function (_super) {
|
|
|
5021
5321
|
*/
|
|
5022
5322
|
module.exports = RemoteDataTrackPublication;
|
|
5023
5323
|
|
|
5024
|
-
},{"./remotetrackpublication":
|
|
5324
|
+
},{"./remotetrackpublication":36}],35:[function(require,module,exports){
|
|
5025
5325
|
'use strict';
|
|
5026
5326
|
var __extends = (this && this.__extends) || (function () {
|
|
5027
5327
|
var extendStatics = function (d, b) {
|
|
@@ -5307,7 +5607,7 @@ function playIfPausedWhileInBackground(remoteMediaTrack) {
|
|
|
5307
5607
|
*/
|
|
5308
5608
|
module.exports = mixinRemoteMediaTrack;
|
|
5309
5609
|
|
|
5310
|
-
},{"../../util/constants":
|
|
5610
|
+
},{"../../util/constants":125,"../../util/documentvisibilitymonitor.js":128,"../../webrtc/util":170}],36:[function(require,module,exports){
|
|
5311
5611
|
'use strict';
|
|
5312
5612
|
var __extends = (this && this.__extends) || (function () {
|
|
5313
5613
|
var extendStatics = function (d, b) {
|
|
@@ -5502,7 +5802,7 @@ var RemoteTrackPublication = /** @class */ (function (_super) {
|
|
|
5502
5802
|
*/
|
|
5503
5803
|
module.exports = RemoteTrackPublication;
|
|
5504
5804
|
|
|
5505
|
-
},{"./trackpublication":
|
|
5805
|
+
},{"./trackpublication":40}],37:[function(require,module,exports){
|
|
5506
5806
|
'use strict';
|
|
5507
5807
|
var __extends = (this && this.__extends) || (function () {
|
|
5508
5808
|
var extendStatics = function (d, b) {
|
|
@@ -5936,7 +6236,7 @@ function maybeUpdateDimensionHint(remoteVideoTrack) {
|
|
|
5936
6236
|
*/
|
|
5937
6237
|
module.exports = RemoteVideoTrack;
|
|
5938
6238
|
|
|
5939
|
-
},{"../../util/documentvisibilitymonitor.js":
|
|
6239
|
+
},{"../../util/documentvisibilitymonitor.js":128,"../../util/nullobserver.js":138,"../../util/timeout":145,"./remotemediatrack":35,"./videotrack":43}],38:[function(require,module,exports){
|
|
5940
6240
|
'use strict';
|
|
5941
6241
|
var __extends = (this && this.__extends) || (function () {
|
|
5942
6242
|
var extendStatics = function (d, b) {
|
|
@@ -6008,7 +6308,7 @@ var RemoteVideoTrackPublication = /** @class */ (function (_super) {
|
|
|
6008
6308
|
*/
|
|
6009
6309
|
module.exports = RemoteVideoTrackPublication;
|
|
6010
6310
|
|
|
6011
|
-
},{"./remotetrackpublication":
|
|
6311
|
+
},{"./remotetrackpublication":36}],39:[function(require,module,exports){
|
|
6012
6312
|
'use strict';
|
|
6013
6313
|
var __extends = (this && this.__extends) || (function () {
|
|
6014
6314
|
var extendStatics = function (d, b) {
|
|
@@ -6157,7 +6457,7 @@ var MediaTrackSender = /** @class */ (function (_super) {
|
|
|
6157
6457
|
*/
|
|
6158
6458
|
module.exports = MediaTrackSender;
|
|
6159
6459
|
|
|
6160
|
-
},{"./transceiver":
|
|
6460
|
+
},{"./transceiver":41}],40:[function(require,module,exports){
|
|
6161
6461
|
'use strict';
|
|
6162
6462
|
var __extends = (this && this.__extends) || (function () {
|
|
6163
6463
|
var extendStatics = function (d, b) {
|
|
@@ -6254,7 +6554,7 @@ var TrackPublication = /** @class */ (function (_super) {
|
|
|
6254
6554
|
*/
|
|
6255
6555
|
module.exports = TrackPublication;
|
|
6256
6556
|
|
|
6257
|
-
},{"../../eventemitter":
|
|
6557
|
+
},{"../../eventemitter":11,"../../util":131,"../../util/constants":125,"../../util/log":135}],41:[function(require,module,exports){
|
|
6258
6558
|
'use strict';
|
|
6259
6559
|
var __extends = (this && this.__extends) || (function () {
|
|
6260
6560
|
var extendStatics = function (d, b) {
|
|
@@ -6321,7 +6621,7 @@ var MediaTrackTransceiver = /** @class */ (function (_super) {
|
|
|
6321
6621
|
}(TrackTransceiver));
|
|
6322
6622
|
module.exports = MediaTrackTransceiver;
|
|
6323
6623
|
|
|
6324
|
-
},{"../../transceiver":
|
|
6624
|
+
},{"../../transceiver":119}],42:[function(require,module,exports){
|
|
6325
6625
|
'use strict';
|
|
6326
6626
|
var __extends = (this && this.__extends) || (function () {
|
|
6327
6627
|
var extendStatics = function (d, b) {
|
|
@@ -6476,7 +6776,7 @@ var VideoProcessorEventObserver = /** @class */ (function (_super) {
|
|
|
6476
6776
|
}(EventEmitter));
|
|
6477
6777
|
module.exports = VideoProcessorEventObserver;
|
|
6478
6778
|
|
|
6479
|
-
},{"../../util/constants":
|
|
6779
|
+
},{"../../util/constants":125,"events":173}],43:[function(require,module,exports){
|
|
6480
6780
|
'use strict';
|
|
6481
6781
|
var __extends = (this && this.__extends) || (function () {
|
|
6482
6782
|
var extendStatics = function (d, b) {
|
|
@@ -6991,7 +7291,7 @@ function dimensionsChanged(track, elem) {
|
|
|
6991
7291
|
*/
|
|
6992
7292
|
module.exports = VideoTrack;
|
|
6993
7293
|
|
|
6994
|
-
},{"../../util/constants":
|
|
7294
|
+
},{"../../util/constants":125,"./mediatrack":28,"./videoprocessoreventobserver":42}],44:[function(require,module,exports){
|
|
6995
7295
|
'use strict';
|
|
6996
7296
|
var __extends = (this && this.__extends) || (function () {
|
|
6997
7297
|
var extendStatics = function (d, b) {
|
|
@@ -7090,7 +7390,130 @@ var NetworkQualityConfigurationImpl = /** @class */ (function (_super) {
|
|
|
7090
7390
|
}(EventEmitter));
|
|
7091
7391
|
module.exports = NetworkQualityConfigurationImpl;
|
|
7092
7392
|
|
|
7093
|
-
},{"./util":
|
|
7393
|
+
},{"./util":131,"./util/constants":125,"events":173}],45:[function(require,module,exports){
|
|
7394
|
+
/* eslint-disable no-console */
|
|
7395
|
+
'use strict';
|
|
7396
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7397
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7398
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7399
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7400
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7401
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7402
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7403
|
+
});
|
|
7404
|
+
};
|
|
7405
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
7406
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
7407
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
7408
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
7409
|
+
function step(op) {
|
|
7410
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
7411
|
+
while (_) try {
|
|
7412
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
7413
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
7414
|
+
switch (op[0]) {
|
|
7415
|
+
case 0: case 1: t = op; break;
|
|
7416
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
7417
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
7418
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
7419
|
+
default:
|
|
7420
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
7421
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
7422
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
7423
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
7424
|
+
if (t[2]) _.ops.pop();
|
|
7425
|
+
_.trys.pop(); continue;
|
|
7426
|
+
}
|
|
7427
|
+
op = body.call(thisArg, _);
|
|
7428
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
7429
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7430
|
+
}
|
|
7431
|
+
};
|
|
7432
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7433
|
+
exports.createNoiseCancellationAudioProcessor = void 0;
|
|
7434
|
+
var Log = require('./util/log');
|
|
7435
|
+
var dynamicImport = require('./dynamicImport');
|
|
7436
|
+
var KRISP_PLUGIN_FILE = 'krispsdk.mjs';
|
|
7437
|
+
var RNNOISE_PLUGIN_FILE = 'rnnoise_sdk.mjs';
|
|
7438
|
+
var audioProcessors = new Map();
|
|
7439
|
+
function createNoiseCancellationAudioProcessor(noiseCancellationOptions, log) {
|
|
7440
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7441
|
+
var audioProcessor, sdkFilePath, rootDir, dynamicModule, plugin_1, er_1;
|
|
7442
|
+
return __generator(this, function (_a) {
|
|
7443
|
+
switch (_a.label) {
|
|
7444
|
+
case 0:
|
|
7445
|
+
audioProcessor = audioProcessors.get(noiseCancellationOptions.vendor);
|
|
7446
|
+
if (!!audioProcessor) return [3 /*break*/, 6];
|
|
7447
|
+
sdkFilePath = void 0;
|
|
7448
|
+
rootDir = noiseCancellationOptions.sdkAssetsPath;
|
|
7449
|
+
switch (noiseCancellationOptions.vendor) {
|
|
7450
|
+
case 'krisp':
|
|
7451
|
+
sdkFilePath = rootDir + "/" + KRISP_PLUGIN_FILE;
|
|
7452
|
+
break;
|
|
7453
|
+
case 'rnnoise':
|
|
7454
|
+
sdkFilePath = rootDir + "/" + RNNOISE_PLUGIN_FILE;
|
|
7455
|
+
break;
|
|
7456
|
+
default:
|
|
7457
|
+
throw new Error("Unsupported NoiseCancellationOptions.vendor: " + noiseCancellationOptions.vendor);
|
|
7458
|
+
}
|
|
7459
|
+
_a.label = 1;
|
|
7460
|
+
case 1:
|
|
7461
|
+
_a.trys.push([1, 5, , 6]);
|
|
7462
|
+
log.debug('loading noise cancellation sdk: ', sdkFilePath);
|
|
7463
|
+
return [4 /*yield*/, dynamicImport(sdkFilePath)];
|
|
7464
|
+
case 2:
|
|
7465
|
+
dynamicModule = _a.sent();
|
|
7466
|
+
log.debug('Loaded noise cancellation sdk:', dynamicModule);
|
|
7467
|
+
plugin_1 = dynamicModule.default;
|
|
7468
|
+
if (!!plugin_1.isInitialized()) return [3 /*break*/, 4];
|
|
7469
|
+
log.debug('initializing noise cancellation sdk: ', rootDir);
|
|
7470
|
+
return [4 /*yield*/, plugin_1.init({ rootDir: rootDir })];
|
|
7471
|
+
case 3:
|
|
7472
|
+
_a.sent();
|
|
7473
|
+
log.debug('noise cancellation sdk initialized!');
|
|
7474
|
+
_a.label = 4;
|
|
7475
|
+
case 4:
|
|
7476
|
+
audioProcessor = {
|
|
7477
|
+
vendor: noiseCancellationOptions.vendor,
|
|
7478
|
+
isInitialized: function () { return plugin_1.isInitialized(); },
|
|
7479
|
+
isConnected: function () { return plugin_1.isConnected(); },
|
|
7480
|
+
isEnabled: function () { return plugin_1.isEnabled(); },
|
|
7481
|
+
disconnect: function () { return plugin_1.disconnect(); },
|
|
7482
|
+
enable: function () { return plugin_1.enable(); },
|
|
7483
|
+
disable: function () { return plugin_1.disable(); },
|
|
7484
|
+
destroy: function () { return plugin_1.destroy(); },
|
|
7485
|
+
setLogging: function (enable) { return plugin_1.setLogging(enable); },
|
|
7486
|
+
connect: function (sourceTrack) {
|
|
7487
|
+
log.debug('connect: ', sourceTrack.id);
|
|
7488
|
+
if (plugin_1.isConnected()) {
|
|
7489
|
+
plugin_1.disconnect();
|
|
7490
|
+
}
|
|
7491
|
+
var mediaStream = plugin_1.connect(new MediaStream([sourceTrack]));
|
|
7492
|
+
if (!mediaStream) {
|
|
7493
|
+
throw new Error('Error connecting with noise cancellation sdk');
|
|
7494
|
+
}
|
|
7495
|
+
var cleanTrack = mediaStream.getAudioTracks()[0];
|
|
7496
|
+
if (!cleanTrack) {
|
|
7497
|
+
throw new Error('Error getting clean track from noise cancellation sdk');
|
|
7498
|
+
}
|
|
7499
|
+
plugin_1.enable();
|
|
7500
|
+
return cleanTrack;
|
|
7501
|
+
},
|
|
7502
|
+
};
|
|
7503
|
+
audioProcessors.set(noiseCancellationOptions.vendor, audioProcessor);
|
|
7504
|
+
return [3 /*break*/, 6];
|
|
7505
|
+
case 5:
|
|
7506
|
+
er_1 = _a.sent();
|
|
7507
|
+
log.error("Error loading noise cancellation sdk:" + sdkFilePath, er_1);
|
|
7508
|
+
throw er_1;
|
|
7509
|
+
case 6: return [2 /*return*/, audioProcessor];
|
|
7510
|
+
}
|
|
7511
|
+
});
|
|
7512
|
+
});
|
|
7513
|
+
}
|
|
7514
|
+
exports.createNoiseCancellationAudioProcessor = createNoiseCancellationAudioProcessor;
|
|
7515
|
+
|
|
7516
|
+
},{"./dynamicImport":9,"./util/log":135}],46:[function(require,module,exports){
|
|
7094
7517
|
'use strict';
|
|
7095
7518
|
var __extends = (this && this.__extends) || (function () {
|
|
7096
7519
|
var extendStatics = function (d, b) {
|
|
@@ -7707,7 +8130,7 @@ function reemitTrackPublicationEvents(participant, publication) {
|
|
|
7707
8130
|
}
|
|
7708
8131
|
module.exports = Participant;
|
|
7709
8132
|
|
|
7710
|
-
},{"./eventemitter":
|
|
8133
|
+
},{"./eventemitter":11,"./media/track/remoteaudiotrack":31,"./media/track/remoteaudiotrackpublication":32,"./media/track/remotedatatrack":33,"./media/track/remotedatatrackpublication":34,"./media/track/remotevideotrack":37,"./media/track/remotevideotrackpublication":38,"./util":131}],47:[function(require,module,exports){
|
|
7711
8134
|
"use strict";
|
|
7712
8135
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7713
8136
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -7861,7 +8284,7 @@ function extractSelectedActiveCandidatePair(stats) {
|
|
|
7861
8284
|
};
|
|
7862
8285
|
}
|
|
7863
8286
|
|
|
7864
|
-
},{}],
|
|
8287
|
+
},{}],48:[function(require,module,exports){
|
|
7865
8288
|
"use strict";
|
|
7866
8289
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7867
8290
|
exports.getTurnCredentials = void 0;
|
|
@@ -7909,7 +8332,7 @@ function getTurnCredentials(token, wsServer) {
|
|
|
7909
8332
|
}
|
|
7910
8333
|
exports.getTurnCredentials = getTurnCredentials;
|
|
7911
8334
|
|
|
7912
|
-
},{"../twilioconnection.js":
|
|
8335
|
+
},{"../twilioconnection.js":120,"../util/constants":125,"../util/twilio-video-errors":146,"events":173}],49:[function(require,module,exports){
|
|
7913
8336
|
"use strict";
|
|
7914
8337
|
var __read = (this && this.__read) || function (o, n) {
|
|
7915
8338
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -7950,7 +8373,7 @@ function makeStat(values) {
|
|
|
7950
8373
|
}
|
|
7951
8374
|
exports.makeStat = makeStat;
|
|
7952
8375
|
|
|
7953
|
-
},{}],
|
|
8376
|
+
},{}],50:[function(require,module,exports){
|
|
7954
8377
|
"use strict";
|
|
7955
8378
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7956
8379
|
exports.mosToScore = exports.calculateMOS = void 0;
|
|
@@ -8011,7 +8434,7 @@ function mosToScore(mosValue) {
|
|
|
8011
8434
|
}
|
|
8012
8435
|
exports.mosToScore = mosToScore;
|
|
8013
8436
|
|
|
8014
|
-
},{}],
|
|
8437
|
+
},{}],51:[function(require,module,exports){
|
|
8015
8438
|
"use strict";
|
|
8016
8439
|
var __extends = (this && this.__extends) || (function () {
|
|
8017
8440
|
var extendStatics = function (d, b) {
|
|
@@ -8085,7 +8508,7 @@ var getturncredentials_1 = require("./getturncredentials");
|
|
|
8085
8508
|
var makestat_1 = require("./makestat");
|
|
8086
8509
|
var syntheticaudio_1 = require("./syntheticaudio");
|
|
8087
8510
|
var syntheticvideo_1 = require("./syntheticvideo");
|
|
8088
|
-
var
|
|
8511
|
+
var index_1 = require("../util/index");
|
|
8089
8512
|
var WS_SERVER = require('../util/constants').WS_SERVER;
|
|
8090
8513
|
var Log = require('../util/log');
|
|
8091
8514
|
var EventEmitter = require('../eventemitter');
|
|
@@ -8512,7 +8935,7 @@ var PreflightTest = /** @class */ (function (_super) {
|
|
|
8512
8935
|
case 0:
|
|
8513
8936
|
startTime = Date.now();
|
|
8514
8937
|
STAT_INTERVAL = Math.min(1000, duration);
|
|
8515
|
-
return [4 /*yield*/,
|
|
8938
|
+
return [4 /*yield*/, index_1.waitForSometime(STAT_INTERVAL)];
|
|
8516
8939
|
case 1:
|
|
8517
8940
|
_a.sent();
|
|
8518
8941
|
return [4 /*yield*/, this._collectRTCStats(collectedStats, senderPC, receiverPC)];
|
|
@@ -8655,7 +9078,7 @@ function runPreflight(token, options) {
|
|
|
8655
9078
|
}
|
|
8656
9079
|
exports.runPreflight = runPreflight;
|
|
8657
9080
|
|
|
8658
|
-
},{"../eventemitter":
|
|
9081
|
+
},{"../eventemitter":11,"../util/constants":125,"../util/eventobserver":129,"../util/index":131,"../util/insightspublisher":132,"../util/log":135,"../util/movingaveragedelta":136,"../util/sid":143,"../util/twilio-video-errors":146,"./getCombinedConnectionStats":47,"./getturncredentials":48,"./makestat":49,"./mos":50,"./syntheticaudio":52,"./syntheticvideo":53,"./timer":54}],52:[function(require,module,exports){
|
|
8659
9082
|
"use strict";
|
|
8660
9083
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8661
9084
|
exports.syntheticAudio = void 0;
|
|
@@ -8678,7 +9101,7 @@ function syntheticAudio() {
|
|
|
8678
9101
|
}
|
|
8679
9102
|
exports.syntheticAudio = syntheticAudio;
|
|
8680
9103
|
|
|
8681
|
-
},{"../webaudio/audiocontext":
|
|
9104
|
+
},{"../webaudio/audiocontext":152}],53:[function(require,module,exports){
|
|
8682
9105
|
"use strict";
|
|
8683
9106
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8684
9107
|
exports.syntheticVideo = void 0;
|
|
@@ -8712,7 +9135,7 @@ function syntheticVideo(_a) {
|
|
|
8712
9135
|
}
|
|
8713
9136
|
exports.syntheticVideo = syntheticVideo;
|
|
8714
9137
|
|
|
8715
|
-
},{}],
|
|
9138
|
+
},{}],54:[function(require,module,exports){
|
|
8716
9139
|
"use strict";
|
|
8717
9140
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8718
9141
|
exports.Timer = void 0;
|
|
@@ -8742,7 +9165,7 @@ var Timer = /** @class */ (function () {
|
|
|
8742
9165
|
}());
|
|
8743
9166
|
exports.Timer = Timer;
|
|
8744
9167
|
|
|
8745
|
-
},{}],
|
|
9168
|
+
},{}],55:[function(require,module,exports){
|
|
8746
9169
|
'use strict';
|
|
8747
9170
|
var __extends = (this && this.__extends) || (function () {
|
|
8748
9171
|
var extendStatics = function (d, b) {
|
|
@@ -8843,7 +9266,7 @@ var QueueingEventEmitter = /** @class */ (function (_super) {
|
|
|
8843
9266
|
}(EventEmitter));
|
|
8844
9267
|
module.exports = QueueingEventEmitter;
|
|
8845
9268
|
|
|
8846
|
-
},{"events":
|
|
9269
|
+
},{"events":173}],56:[function(require,module,exports){
|
|
8847
9270
|
'use strict';
|
|
8848
9271
|
var __extends = (this && this.__extends) || (function () {
|
|
8849
9272
|
var extendStatics = function (d, b) {
|
|
@@ -9124,7 +9547,7 @@ var RemoteParticipant = /** @class */ (function (_super) {
|
|
|
9124
9547
|
*/
|
|
9125
9548
|
module.exports = RemoteParticipant;
|
|
9126
9549
|
|
|
9127
|
-
},{"./participant":
|
|
9550
|
+
},{"./participant":46}],57:[function(require,module,exports){
|
|
9128
9551
|
'use strict';
|
|
9129
9552
|
var __extends = (this && this.__extends) || (function () {
|
|
9130
9553
|
var extendStatics = function (d, b) {
|
|
@@ -9288,6 +9711,7 @@ var Room = /** @class */ (function (_super) {
|
|
|
9288
9711
|
handleLocalParticipantEvents(_this, localParticipant);
|
|
9289
9712
|
handleRecordingEvents(_this, signaling.recording);
|
|
9290
9713
|
handleSignalingEvents(_this, signaling);
|
|
9714
|
+
verifyNoiseCancellation(_this);
|
|
9291
9715
|
log.info('Created a new Room:', _this.name);
|
|
9292
9716
|
log.debug('Initial RemoteParticipants:', Array.from(_this._participants.values()));
|
|
9293
9717
|
return _this;
|
|
@@ -9327,6 +9751,17 @@ var Room = /** @class */ (function (_super) {
|
|
|
9327
9751
|
};
|
|
9328
9752
|
return Room;
|
|
9329
9753
|
}(EventEmitter));
|
|
9754
|
+
function verifyNoiseCancellation(room) {
|
|
9755
|
+
var allowedAudioProcessors = room.localParticipant._signaling.audioProcessors;
|
|
9756
|
+
room.localParticipant.audioTracks.forEach(function (_a) {
|
|
9757
|
+
var track = _a.track;
|
|
9758
|
+
var noiseCancellation = track.noiseCancellation;
|
|
9759
|
+
if (noiseCancellation && !allowedAudioProcessors.includes(noiseCancellation.vendor)) {
|
|
9760
|
+
room._log.warn(noiseCancellation.vendor + " is not supported in this room. disabling it permanently");
|
|
9761
|
+
noiseCancellation.disablePermanently();
|
|
9762
|
+
}
|
|
9763
|
+
});
|
|
9764
|
+
}
|
|
9330
9765
|
function rewriteLocalTrackIds(room, trackStats) {
|
|
9331
9766
|
var localParticipantSignaling = room.localParticipant._signaling;
|
|
9332
9767
|
return trackStats.reduce(function (trackStats, trackStat) {
|
|
@@ -9739,7 +10174,7 @@ function handleSignalingEvents(room, signaling) {
|
|
|
9739
10174
|
}
|
|
9740
10175
|
module.exports = Room;
|
|
9741
10176
|
|
|
9742
|
-
},{"./eventemitter":
|
|
10177
|
+
},{"./eventemitter":11,"./remoteparticipant":56,"./stats/statsreport":116,"./util":131}],58:[function(require,module,exports){
|
|
9743
10178
|
/* eslint consistent-return:0 */
|
|
9744
10179
|
'use strict';
|
|
9745
10180
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -9909,7 +10344,7 @@ var Signaling = /** @class */ (function (_super) {
|
|
|
9909
10344
|
}(StateMachine));
|
|
9910
10345
|
module.exports = Signaling;
|
|
9911
10346
|
|
|
9912
|
-
},{"../statemachine":
|
|
10347
|
+
},{"../statemachine":88,"./participant":61,"./room":65}],59:[function(require,module,exports){
|
|
9913
10348
|
'use strict';
|
|
9914
10349
|
var __extends = (this && this.__extends) || (function () {
|
|
9915
10350
|
var extendStatics = function (d, b) {
|
|
@@ -9945,10 +10380,12 @@ var LocalParticipantSignaling = /** @class */ (function (_super) {
|
|
|
9945
10380
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
9946
10381
|
* @param {string} name
|
|
9947
10382
|
* @param {Track.Priority} priority
|
|
10383
|
+
* @param {?NoiseCancellationVendor} noiseCancellationVendor
|
|
9948
10384
|
* @returns {LocalTrackPublicationSignaling} publication
|
|
9949
10385
|
*/
|
|
9950
|
-
LocalParticipantSignaling.prototype.addTrack = function (trackSender, name, priority) {
|
|
9951
|
-
|
|
10386
|
+
LocalParticipantSignaling.prototype.addTrack = function (trackSender, name, priority, noiseCancellationVendor) {
|
|
10387
|
+
if (noiseCancellationVendor === void 0) { noiseCancellationVendor = null; }
|
|
10388
|
+
var publication = this._createLocalTrackPublicationSignaling(trackSender, name, priority, noiseCancellationVendor);
|
|
9952
10389
|
this._trackSendersToPublications.set(trackSender, publication);
|
|
9953
10390
|
this._publicationsToTrackSenders.set(publication, trackSender);
|
|
9954
10391
|
_super.prototype.addTrack.call(this, publication);
|
|
@@ -9989,7 +10426,7 @@ var LocalParticipantSignaling = /** @class */ (function (_super) {
|
|
|
9989
10426
|
}(ParticipantSignaling));
|
|
9990
10427
|
module.exports = LocalParticipantSignaling;
|
|
9991
10428
|
|
|
9992
|
-
},{"./participant":
|
|
10429
|
+
},{"./participant":61}],60:[function(require,module,exports){
|
|
9993
10430
|
'use strict';
|
|
9994
10431
|
var __extends = (this && this.__extends) || (function () {
|
|
9995
10432
|
var extendStatics = function (d, b) {
|
|
@@ -10120,7 +10557,7 @@ function setError(publication, error) {
|
|
|
10120
10557
|
}
|
|
10121
10558
|
module.exports = LocalTrackPublicationSignaling;
|
|
10122
10559
|
|
|
10123
|
-
},{"./track":
|
|
10560
|
+
},{"./track":66}],61:[function(require,module,exports){
|
|
10124
10561
|
'use strict';
|
|
10125
10562
|
var __extends = (this && this.__extends) || (function () {
|
|
10126
10563
|
var extendStatics = function (d, b) {
|
|
@@ -10345,7 +10782,7 @@ var ParticipantSignaling = /** @class */ (function (_super) {
|
|
|
10345
10782
|
*/
|
|
10346
10783
|
module.exports = ParticipantSignaling;
|
|
10347
10784
|
|
|
10348
|
-
},{"../statemachine":
|
|
10785
|
+
},{"../statemachine":88,"../stats/networkqualitystats":103}],62:[function(require,module,exports){
|
|
10349
10786
|
'use strict';
|
|
10350
10787
|
var __extends = (this && this.__extends) || (function () {
|
|
10351
10788
|
var extendStatics = function (d, b) {
|
|
@@ -10418,7 +10855,7 @@ var RecordingSignaling = /** @class */ (function (_super) {
|
|
|
10418
10855
|
*/
|
|
10419
10856
|
module.exports = RecordingSignaling;
|
|
10420
10857
|
|
|
10421
|
-
},{"events":
|
|
10858
|
+
},{"events":173}],63:[function(require,module,exports){
|
|
10422
10859
|
'use strict';
|
|
10423
10860
|
var __extends = (this && this.__extends) || (function () {
|
|
10424
10861
|
var extendStatics = function (d, b) {
|
|
@@ -10458,7 +10895,7 @@ var RemoteParticipantSignaling = /** @class */ (function (_super) {
|
|
|
10458
10895
|
}(ParticipantSignaling));
|
|
10459
10896
|
module.exports = RemoteParticipantSignaling;
|
|
10460
10897
|
|
|
10461
|
-
},{"./participant":
|
|
10898
|
+
},{"./participant":61}],64:[function(require,module,exports){
|
|
10462
10899
|
'use strict';
|
|
10463
10900
|
var __extends = (this && this.__extends) || (function () {
|
|
10464
10901
|
var extendStatics = function (d, b) {
|
|
@@ -10563,7 +11000,7 @@ var RemoteTrackPublicationSignaling = /** @class */ (function (_super) {
|
|
|
10563
11000
|
}(TrackSignaling));
|
|
10564
11001
|
module.exports = RemoteTrackPublicationSignaling;
|
|
10565
11002
|
|
|
10566
|
-
},{"./track":
|
|
11003
|
+
},{"./track":66}],65:[function(require,module,exports){
|
|
10567
11004
|
'use strict';
|
|
10568
11005
|
var __extends = (this && this.__extends) || (function () {
|
|
10569
11006
|
var extendStatics = function (d, b) {
|
|
@@ -10844,7 +11281,7 @@ function maybeUpdateState(roomSignaling) {
|
|
|
10844
11281
|
}
|
|
10845
11282
|
module.exports = RoomSignaling;
|
|
10846
11283
|
|
|
10847
|
-
},{"../statemachine":
|
|
11284
|
+
},{"../statemachine":88,"../util":131,"../util/constants":125,"../util/log":135,"../util/timeout":145,"../util/twilio-video-errors":146,"./recording":62}],66:[function(require,module,exports){
|
|
10848
11285
|
'use strict';
|
|
10849
11286
|
var __extends = (this && this.__extends) || (function () {
|
|
10850
11287
|
var extendStatics = function (d, b) {
|
|
@@ -11027,7 +11464,7 @@ var TrackSignaling = /** @class */ (function (_super) {
|
|
|
11027
11464
|
*/
|
|
11028
11465
|
module.exports = TrackSignaling;
|
|
11029
11466
|
|
|
11030
|
-
},{"events":
|
|
11467
|
+
},{"events":173}],67:[function(require,module,exports){
|
|
11031
11468
|
'use strict';
|
|
11032
11469
|
var CancelablePromise = require('../../util/cancelablepromise');
|
|
11033
11470
|
var DefaultPeerConnectionManager = require('./peerconnectionmanager');
|
|
@@ -11116,8 +11553,6 @@ function createCancelableRoomSignalingPromise(token, wsServer, localParticipant,
|
|
|
11116
11553
|
reject(new SignalingIncomingMessageInvalidError());
|
|
11117
11554
|
return;
|
|
11118
11555
|
}
|
|
11119
|
-
var signalingRegion = initialState.options.signaling_region;
|
|
11120
|
-
localParticipant.setSignalingRegion(signalingRegion);
|
|
11121
11556
|
resolve(new RoomV2(localParticipant, initialState, transport, peerConnectionManager, options));
|
|
11122
11557
|
});
|
|
11123
11558
|
transport.once('stateChanged', function (state, error) {
|
|
@@ -11146,7 +11581,7 @@ function createCancelableRoomSignalingPromise(token, wsServer, localParticipant,
|
|
|
11146
11581
|
}
|
|
11147
11582
|
module.exports = createCancelableRoomSignalingPromise;
|
|
11148
11583
|
|
|
11149
|
-
},{"../../util":
|
|
11584
|
+
},{"../../util":131,"../../util/cancelablepromise":124,"../../util/twilio-video-errors":146,"./peerconnectionmanager":78,"./room":84,"./twilioconnectiontransport":87}],68:[function(require,module,exports){
|
|
11150
11585
|
'use strict';
|
|
11151
11586
|
var __extends = (this && this.__extends) || (function () {
|
|
11152
11587
|
var extendStatics = function (d, b) {
|
|
@@ -11224,7 +11659,7 @@ var DominantSpeakerSignaling = /** @class */ (function (_super) {
|
|
|
11224
11659
|
*/
|
|
11225
11660
|
module.exports = DominantSpeakerSignaling;
|
|
11226
11661
|
|
|
11227
|
-
},{"./mediasignaling":
|
|
11662
|
+
},{"./mediasignaling":74}],69:[function(require,module,exports){
|
|
11228
11663
|
'use strict';
|
|
11229
11664
|
var Filter = require('../../util/filter');
|
|
11230
11665
|
/**
|
|
@@ -11292,7 +11727,7 @@ var IceBox = /** @class */ (function () {
|
|
|
11292
11727
|
}());
|
|
11293
11728
|
module.exports = IceBox;
|
|
11294
11729
|
|
|
11295
|
-
},{"../../util/filter":
|
|
11730
|
+
},{"../../util/filter":130}],70:[function(require,module,exports){
|
|
11296
11731
|
'use strict';
|
|
11297
11732
|
var _a = require('../../util/constants'), ICE_ACTIVITY_CHECK_PERIOD_MS = _a.ICE_ACTIVITY_CHECK_PERIOD_MS, ICE_INACTIVITY_THRESHOLD_MS = _a.ICE_INACTIVITY_THRESHOLD_MS;
|
|
11298
11733
|
/**
|
|
@@ -11425,7 +11860,7 @@ var IceConnectionMonitor = /** @class */ (function () {
|
|
|
11425
11860
|
}());
|
|
11426
11861
|
module.exports = IceConnectionMonitor;
|
|
11427
11862
|
|
|
11428
|
-
},{"../../util/constants":
|
|
11863
|
+
},{"../../util/constants":125}],71:[function(require,module,exports){
|
|
11429
11864
|
'use strict';
|
|
11430
11865
|
var __extends = (this && this.__extends) || (function () {
|
|
11431
11866
|
var extendStatics = function (d, b) {
|
|
@@ -11490,7 +11925,7 @@ var SignalingV2 = /** @class */ (function (_super) {
|
|
|
11490
11925
|
}(Signaling));
|
|
11491
11926
|
module.exports = SignalingV2;
|
|
11492
11927
|
|
|
11493
|
-
},{"../":
|
|
11928
|
+
},{"../":58,"./cancelableroomsignalingpromise":67,"./localparticipant":72}],72:[function(require,module,exports){
|
|
11494
11929
|
'use strict';
|
|
11495
11930
|
var __extends = (this && this.__extends) || (function () {
|
|
11496
11931
|
var extendStatics = function (d, b) {
|
|
@@ -11570,6 +12005,10 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11570
12005
|
value: null,
|
|
11571
12006
|
writable: true
|
|
11572
12007
|
},
|
|
12008
|
+
audioProcessors: {
|
|
12009
|
+
value: [],
|
|
12010
|
+
writable: true
|
|
12011
|
+
},
|
|
11573
12012
|
bandwidthProfile: {
|
|
11574
12013
|
enumerable: true,
|
|
11575
12014
|
get: function () {
|
|
@@ -11627,6 +12066,13 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11627
12066
|
this.didUpdate();
|
|
11628
12067
|
}
|
|
11629
12068
|
};
|
|
12069
|
+
/**
|
|
12070
|
+
* Sets the AudioProcessors enabled for this room.
|
|
12071
|
+
* @param {string[]} audioProcessors
|
|
12072
|
+
*/
|
|
12073
|
+
LocalParticipantV2.prototype.setAudioProcessors = function (audioProcessors) {
|
|
12074
|
+
this.audioProcessors = audioProcessors;
|
|
12075
|
+
};
|
|
11630
12076
|
/**
|
|
11631
12077
|
* returns current {@link EncodingParametersImpl}.
|
|
11632
12078
|
* @returns {EncodingParametersImpl}
|
|
@@ -11678,10 +12124,11 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11678
12124
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
11679
12125
|
* @param {string} name
|
|
11680
12126
|
* @param {Track.Priority} priority
|
|
12127
|
+
* @param {?NoiseCancellationVendor} noiseCancellationVendor
|
|
11681
12128
|
* @returns {LocalTrackPublicationV2}
|
|
11682
12129
|
*/
|
|
11683
|
-
LocalParticipantV2.prototype._createLocalTrackPublicationSignaling = function (trackSender, name, priority) {
|
|
11684
|
-
return new this._LocalTrackPublicationV2(trackSender, name, priority, { log: this._log });
|
|
12130
|
+
LocalParticipantV2.prototype._createLocalTrackPublicationSignaling = function (trackSender, name, priority, noiseCancellationVendor) {
|
|
12131
|
+
return new this._LocalTrackPublicationV2(trackSender, name, priority, noiseCancellationVendor, { log: this._log });
|
|
11685
12132
|
};
|
|
11686
12133
|
/**
|
|
11687
12134
|
* Add a {@link LocalTrackPublicationV2} for the given {@link DataTrackSender}
|
|
@@ -11691,9 +12138,9 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11691
12138
|
* @param {Track.Priority} priority
|
|
11692
12139
|
* @returns {this}
|
|
11693
12140
|
*/
|
|
11694
|
-
LocalParticipantV2.prototype.addTrack = function (trackSender, name, priority) {
|
|
12141
|
+
LocalParticipantV2.prototype.addTrack = function (trackSender, name, priority, noiseCancellationVendor) {
|
|
11695
12142
|
var _this = this;
|
|
11696
|
-
_super.prototype.addTrack.call(this, trackSender, name, priority);
|
|
12143
|
+
_super.prototype.addTrack.call(this, trackSender, name, priority, noiseCancellationVendor);
|
|
11697
12144
|
var publication = this.getPublication(trackSender);
|
|
11698
12145
|
var isEnabled = publication.isEnabled, updatedPriority = publication.updatedPriority;
|
|
11699
12146
|
var updated = function () {
|
|
@@ -11818,7 +12265,7 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11818
12265
|
*/
|
|
11819
12266
|
module.exports = LocalParticipantV2;
|
|
11820
12267
|
|
|
11821
|
-
},{"../../util":
|
|
12268
|
+
},{"../../util":131,"../../util/constants":125,"../../util/log":135,"../localparticipant":59,"./localtrackpublication":73}],73:[function(require,module,exports){
|
|
11822
12269
|
'use strict';
|
|
11823
12270
|
var __extends = (this && this.__extends) || (function () {
|
|
11824
12271
|
var extendStatics = function (d, b) {
|
|
@@ -11848,9 +12295,10 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11848
12295
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
11849
12296
|
* @param {string} name
|
|
11850
12297
|
* @param {Track.Priority} priority
|
|
12298
|
+
* @param {?NoiseCancellationVendor} noiseCancellationVendor
|
|
11851
12299
|
* @param {object} [options]
|
|
11852
12300
|
*/
|
|
11853
|
-
function LocalTrackPublicationV2(trackSender, name, priority, options) {
|
|
12301
|
+
function LocalTrackPublicationV2(trackSender, name, priority, noiseCancellationVendor, options) {
|
|
11854
12302
|
var _this = _super.call(this, trackSender, name, priority) || this;
|
|
11855
12303
|
Object.defineProperties(_this, {
|
|
11856
12304
|
_log: {
|
|
@@ -11859,6 +12307,9 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11859
12307
|
_mediaStates: {
|
|
11860
12308
|
value: { recordings: null },
|
|
11861
12309
|
writable: true
|
|
12310
|
+
},
|
|
12311
|
+
_noiseCancellationVendor: {
|
|
12312
|
+
value: noiseCancellationVendor,
|
|
11862
12313
|
}
|
|
11863
12314
|
});
|
|
11864
12315
|
return _this;
|
|
@@ -11868,13 +12319,18 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11868
12319
|
* @returns {LocalTrackPublicationV2#Representation} - without the SID
|
|
11869
12320
|
*/
|
|
11870
12321
|
LocalTrackPublicationV2.prototype.getState = function () {
|
|
11871
|
-
|
|
12322
|
+
var state = {
|
|
11872
12323
|
enabled: this.isEnabled,
|
|
11873
12324
|
id: this.id,
|
|
11874
12325
|
kind: this.kind,
|
|
11875
12326
|
name: this.name,
|
|
11876
|
-
priority: this.updatedPriority
|
|
12327
|
+
priority: this.updatedPriority,
|
|
11877
12328
|
};
|
|
12329
|
+
if (this._noiseCancellationVendor) {
|
|
12330
|
+
// eslint-disable-next-line camelcase
|
|
12331
|
+
state.audio_processor = this._noiseCancellationVendor;
|
|
12332
|
+
}
|
|
12333
|
+
return state;
|
|
11878
12334
|
};
|
|
11879
12335
|
LocalTrackPublicationV2.prototype.toString = function () {
|
|
11880
12336
|
return "[LocalTrackPublicationV2: " + this.sid + "]";
|
|
@@ -11936,7 +12392,7 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11936
12392
|
*/
|
|
11937
12393
|
module.exports = LocalTrackPublicationV2;
|
|
11938
12394
|
|
|
11939
|
-
},{"../../util/twilio-video-errors":
|
|
12395
|
+
},{"../../util/twilio-video-errors":146,"../../util/twiliowarning":148,"../localtrackpublication":60}],74:[function(require,module,exports){
|
|
11940
12396
|
/* eslint callback-return:0 */
|
|
11941
12397
|
'use strict';
|
|
11942
12398
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -12033,7 +12489,7 @@ var MediaSignaling = /** @class */ (function (_super) {
|
|
|
12033
12489
|
}(EventEmitter));
|
|
12034
12490
|
module.exports = MediaSignaling;
|
|
12035
12491
|
|
|
12036
|
-
},{"events":
|
|
12492
|
+
},{"events":173}],75:[function(require,module,exports){
|
|
12037
12493
|
/* eslint callback-return:0 */
|
|
12038
12494
|
'use strict';
|
|
12039
12495
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -12192,7 +12648,7 @@ function next(monitor) {
|
|
|
12192
12648
|
*/
|
|
12193
12649
|
module.exports = NetworkQualityMonitor;
|
|
12194
12650
|
|
|
12195
|
-
},{"../../stats/peerconnectionreportfactory":
|
|
12651
|
+
},{"../../stats/peerconnectionreportfactory":106,"events":173}],76:[function(require,module,exports){
|
|
12196
12652
|
'use strict';
|
|
12197
12653
|
var __extends = (this && this.__extends) || (function () {
|
|
12198
12654
|
var extendStatics = function (d, b) {
|
|
@@ -12457,7 +12913,7 @@ function createNetworkQualityInputsMessage(networkQualityInputs, networkQualityR
|
|
|
12457
12913
|
}
|
|
12458
12914
|
module.exports = NetworkQualitySignaling;
|
|
12459
12915
|
|
|
12460
|
-
},{"../../util/asyncvar":
|
|
12916
|
+
},{"../../util/asyncvar":121,"../../util/timeout":145,"./mediasignaling":74}],77:[function(require,module,exports){
|
|
12461
12917
|
'use strict';
|
|
12462
12918
|
var __extends = (this && this.__extends) || (function () {
|
|
12463
12919
|
var extendStatics = function (d, b) {
|
|
@@ -14247,13 +14703,29 @@ function updateEncodingParameters(pcv2) {
|
|
|
14247
14703
|
else {
|
|
14248
14704
|
setMaxBitrate(params, maxBitrate);
|
|
14249
14705
|
}
|
|
14250
|
-
if (!isFirefox &&
|
|
14251
|
-
|
|
14252
|
-
|
|
14253
|
-
|
|
14254
|
-
|
|
14255
|
-
|
|
14256
|
-
|
|
14706
|
+
if (!isFirefox && params.encodings.length > 0) {
|
|
14707
|
+
if (sender.track.kind === 'audio') {
|
|
14708
|
+
// NOTE(mmalavalli): "priority" is a per-sender property and not
|
|
14709
|
+
// a per-encoding-layer property. So, we set the value only on the first
|
|
14710
|
+
// encoding layer. Any attempt to set the value on subsequent encoding
|
|
14711
|
+
// layers (in the case of simulcast) will result in the Promise returned
|
|
14712
|
+
// by RTCRtpSender.setParameters() being rejected. With this, audio encoding
|
|
14713
|
+
// is prioritized the most.
|
|
14714
|
+
params.encodings[0].priority = 'high';
|
|
14715
|
+
}
|
|
14716
|
+
else if (pcv2._isChromeScreenShareTrack(sender.track)) {
|
|
14717
|
+
// NOTE(mmalavalli): Screen share encodings are prioritized more than those
|
|
14718
|
+
// of the camera.
|
|
14719
|
+
params.encodings[0].priority = 'medium';
|
|
14720
|
+
}
|
|
14721
|
+
if (pcv2._enableDscp) {
|
|
14722
|
+
// NOTE(mmalavalli): "networkPriority" is a per-sender property and not
|
|
14723
|
+
// a per-encoding-layer property. So, we set the value only on the first
|
|
14724
|
+
// encoding layer. Any attempt to set the value on subsequent encoding
|
|
14725
|
+
// layers (in the case of simulcast) will result in the Promise returned
|
|
14726
|
+
// by RTCRtpSender.setParameters() being rejected.
|
|
14727
|
+
params.encodings[0].networkPriority = 'high';
|
|
14728
|
+
}
|
|
14257
14729
|
}
|
|
14258
14730
|
// when a sender is reused, delete any active encodings set by server.
|
|
14259
14731
|
var trackReplaced = pcv2._rtpNewSenders.has(sender);
|
|
@@ -14294,7 +14766,7 @@ function setMaxBitrate(params, maxBitrate) {
|
|
|
14294
14766
|
}
|
|
14295
14767
|
module.exports = PeerConnectionV2;
|
|
14296
14768
|
|
|
14297
|
-
},{"../../data/receiver":5,"../../media/track/receiver":
|
|
14769
|
+
},{"../../data/receiver":5,"../../media/track/receiver":30,"../../statemachine":88,"../../util":131,"../../util/backoff":122,"../../util/constants":125,"../../util/log":135,"../../util/sdp":139,"../../util/sdp/issue8329":140,"../../util/sdp/trackmatcher":142,"../../util/timeout":145,"../../util/twilio-video-errors":146,"../../webrtc":157,"../../webrtc/util":170,"./icebox":69,"./iceconnectionmonitor.js":70}],78:[function(require,module,exports){
|
|
14298
14770
|
'use strict';
|
|
14299
14771
|
var __extends = (this && this.__extends) || (function () {
|
|
14300
14772
|
var extendStatics = function (d, b) {
|
|
@@ -14862,7 +15334,7 @@ function updateConnectionState(pcm) {
|
|
|
14862
15334
|
}
|
|
14863
15335
|
module.exports = PeerConnectionManager;
|
|
14864
15336
|
|
|
14865
|
-
},{"../../media/track/sender":
|
|
15337
|
+
},{"../../media/track/sender":39,"../../queueingeventemitter":55,"../../util":131,"../../util/twilio-video-errors":146,"../../webaudio/audiocontext":152,"../../webrtc/util":170,"./peerconnection":77}],79:[function(require,module,exports){
|
|
14866
15338
|
/* eslint callback-return:0 */
|
|
14867
15339
|
'use strict';
|
|
14868
15340
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -14948,7 +15420,7 @@ var PublisherHintsSignaling = /** @class */ (function (_super) {
|
|
|
14948
15420
|
}(MediaSignaling));
|
|
14949
15421
|
module.exports = PublisherHintsSignaling;
|
|
14950
15422
|
|
|
14951
|
-
},{"./mediasignaling":
|
|
15423
|
+
},{"./mediasignaling":74}],80:[function(require,module,exports){
|
|
14952
15424
|
'use strict';
|
|
14953
15425
|
var __extends = (this && this.__extends) || (function () {
|
|
14954
15426
|
var extendStatics = function (d, b) {
|
|
@@ -15008,7 +15480,7 @@ var RecordingV2 = /** @class */ (function (_super) {
|
|
|
15008
15480
|
*/
|
|
15009
15481
|
module.exports = RecordingV2;
|
|
15010
15482
|
|
|
15011
|
-
},{"../recording":
|
|
15483
|
+
},{"../recording":62}],81:[function(require,module,exports){
|
|
15012
15484
|
'use strict';
|
|
15013
15485
|
var __extends = (this && this.__extends) || (function () {
|
|
15014
15486
|
var extendStatics = function (d, b) {
|
|
@@ -15128,7 +15600,7 @@ var RemoteParticipantV2 = /** @class */ (function (_super) {
|
|
|
15128
15600
|
}(RemoteParticipantSignaling));
|
|
15129
15601
|
module.exports = RemoteParticipantV2;
|
|
15130
15602
|
|
|
15131
|
-
},{"../remoteparticipant":
|
|
15603
|
+
},{"../remoteparticipant":63,"./remotetrackpublication":82}],82:[function(require,module,exports){
|
|
15132
15604
|
'use strict';
|
|
15133
15605
|
var __extends = (this && this.__extends) || (function () {
|
|
15134
15606
|
var extendStatics = function (d, b) {
|
|
@@ -15182,7 +15654,7 @@ var RemoteTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
15182
15654
|
*/
|
|
15183
15655
|
module.exports = RemoteTrackPublicationV2;
|
|
15184
15656
|
|
|
15185
|
-
},{"../remotetrackpublication":
|
|
15657
|
+
},{"../remotetrackpublication":64}],83:[function(require,module,exports){
|
|
15186
15658
|
/* eslint callback-return:0 */
|
|
15187
15659
|
'use strict';
|
|
15188
15660
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -15333,7 +15805,7 @@ var RenderHintsSignaling = /** @class */ (function (_super) {
|
|
|
15333
15805
|
}(MediaSignaling));
|
|
15334
15806
|
module.exports = RenderHintsSignaling;
|
|
15335
15807
|
|
|
15336
|
-
},{"../../util":
|
|
15808
|
+
},{"../../util":131,"../../util/timeout":145,"./mediasignaling":74}],84:[function(require,module,exports){
|
|
15337
15809
|
/* eslint-disable no-console */
|
|
15338
15810
|
'use strict';
|
|
15339
15811
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -15405,6 +15877,13 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15405
15877
|
statsPublishIntervalMs: STATS_PUBLISH_INTERVAL_MS
|
|
15406
15878
|
}, options);
|
|
15407
15879
|
localParticipant.setBandwidthProfile(options.bandwidthProfile);
|
|
15880
|
+
var _a = initialState.options, signalingRegion = _a.signaling_region, _b = _a.audio_processors, audioProcessors = _b === void 0 ? [] : _b;
|
|
15881
|
+
localParticipant.setSignalingRegion(signalingRegion);
|
|
15882
|
+
if (audioProcessors.includes('krisp')) {
|
|
15883
|
+
// Note(mpatwardhan): we add rnnoise as allowed_processor to enable testing our pipeline e2e.
|
|
15884
|
+
audioProcessors.push('rnnoise');
|
|
15885
|
+
}
|
|
15886
|
+
localParticipant.setAudioProcessors(audioProcessors);
|
|
15408
15887
|
peerConnectionManager.setIceReconnectTimeout(options.sessionTimeout);
|
|
15409
15888
|
_this = _super.call(this, localParticipant, initialState.sid, initialState.name, options) || this;
|
|
15410
15889
|
var getTrackReceiver = function (id) { return _this._getTrackReceiver(id); };
|
|
@@ -15496,7 +15975,7 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15496
15975
|
periodicallyPublishStats(_this, transport, options.statsPublishIntervalMs);
|
|
15497
15976
|
_this._update(initialState);
|
|
15498
15977
|
// NOTE(mpatwardhan) after initial state we know if publisher_hints are enabled or not
|
|
15499
|
-
// if they are not enabled. we need to undo simulcast that
|
|
15978
|
+
// if they are not enabled. we need to undo simulcast that was enabled with initial offer.
|
|
15500
15979
|
_this._peerConnectionManager.setEffectiveAdaptiveSimulcast(_this._publisherHintsSignaling.isSetup);
|
|
15501
15980
|
return _this;
|
|
15502
15981
|
}
|
|
@@ -16184,7 +16663,7 @@ function replaceNullsWithDefaults(activeIceCandidatePair, peerConnectionId) {
|
|
|
16184
16663
|
}
|
|
16185
16664
|
module.exports = RoomV2;
|
|
16186
16665
|
|
|
16187
|
-
},{"../../stats/statsreport":
|
|
16666
|
+
},{"../../stats/statsreport":116,"../../util":131,"../../util/movingaveragedelta":136,"../../util/twilio-video-errors":146,"../room":65,"./dominantspeakersignaling":68,"./networkqualitymonitor":75,"./networkqualitysignaling":76,"./publisherhintsignaling.js":79,"./recording":80,"./remoteparticipant":81,"./renderhintssignaling":83,"./trackprioritysignaling":85,"./trackswitchoffsignaling":86}],85:[function(require,module,exports){
|
|
16188
16667
|
'use strict';
|
|
16189
16668
|
var __extends = (this && this.__extends) || (function () {
|
|
16190
16669
|
var extendStatics = function (d, b) {
|
|
@@ -16250,7 +16729,7 @@ var TrackPrioritySignaling = /** @class */ (function (_super) {
|
|
|
16250
16729
|
}(MediaSignaling));
|
|
16251
16730
|
module.exports = TrackPrioritySignaling;
|
|
16252
16731
|
|
|
16253
|
-
},{"./mediasignaling":
|
|
16732
|
+
},{"./mediasignaling":74}],86:[function(require,module,exports){
|
|
16254
16733
|
'use strict';
|
|
16255
16734
|
var __extends = (this && this.__extends) || (function () {
|
|
16256
16735
|
var extendStatics = function (d, b) {
|
|
@@ -16308,7 +16787,7 @@ var TrackSwitchOffSignaling = /** @class */ (function (_super) {
|
|
|
16308
16787
|
*/
|
|
16309
16788
|
module.exports = TrackSwitchOffSignaling;
|
|
16310
16789
|
|
|
16311
|
-
},{"./mediasignaling":
|
|
16790
|
+
},{"./mediasignaling":74}],87:[function(require,module,exports){
|
|
16312
16791
|
'use strict';
|
|
16313
16792
|
var __extends = (this && this.__extends) || (function () {
|
|
16314
16793
|
var extendStatics = function (d, b) {
|
|
@@ -16895,7 +17374,7 @@ function setupTransport(transport) {
|
|
|
16895
17374
|
}
|
|
16896
17375
|
module.exports = TwilioConnectionTransport;
|
|
16897
17376
|
|
|
16898
|
-
},{"../../statemachine":
|
|
17377
|
+
},{"../../statemachine":88,"../../twilioconnection":120,"../../util":131,"../../util/backoff":122,"../../util/constants":125,"../../util/timeout":145,"../../util/twilio-video-errors":146}],88:[function(require,module,exports){
|
|
16899
17378
|
'use strict';
|
|
16900
17379
|
var __extends = (this && this.__extends) || (function () {
|
|
16901
17380
|
var extendStatics = function (d, b) {
|
|
@@ -17341,7 +17820,7 @@ function createUnreachableError(here, there) {
|
|
|
17341
17820
|
}
|
|
17342
17821
|
module.exports = StateMachine;
|
|
17343
17822
|
|
|
17344
|
-
},{"./util":
|
|
17823
|
+
},{"./util":131,"events":173}],89:[function(require,module,exports){
|
|
17345
17824
|
/* eslint no-undefined:0 */
|
|
17346
17825
|
'use strict';
|
|
17347
17826
|
/**
|
|
@@ -17354,7 +17833,7 @@ function average(xs) {
|
|
|
17354
17833
|
}
|
|
17355
17834
|
module.exports = average;
|
|
17356
17835
|
|
|
17357
|
-
},{}],
|
|
17836
|
+
},{}],90:[function(require,module,exports){
|
|
17358
17837
|
'use strict';
|
|
17359
17838
|
/**
|
|
17360
17839
|
* @property {number} [availableSend] - bps (undefined in Firefox)
|
|
@@ -17412,7 +17891,7 @@ var IceReport = /** @class */ (function () {
|
|
|
17412
17891
|
}());
|
|
17413
17892
|
module.exports = IceReport;
|
|
17414
17893
|
|
|
17415
|
-
},{}],
|
|
17894
|
+
},{}],91:[function(require,module,exports){
|
|
17416
17895
|
'use strict';
|
|
17417
17896
|
var IceReport = require('./icereport');
|
|
17418
17897
|
/**
|
|
@@ -17457,7 +17936,7 @@ var IceReportFactory = /** @class */ (function () {
|
|
|
17457
17936
|
}());
|
|
17458
17937
|
module.exports = IceReportFactory;
|
|
17459
17938
|
|
|
17460
|
-
},{"./icereport":
|
|
17939
|
+
},{"./icereport":90}],92:[function(require,module,exports){
|
|
17461
17940
|
'use strict';
|
|
17462
17941
|
var __extends = (this && this.__extends) || (function () {
|
|
17463
17942
|
var extendStatics = function (d, b) {
|
|
@@ -17515,7 +17994,7 @@ var LocalAudioTrackStats = /** @class */ (function (_super) {
|
|
|
17515
17994
|
*/
|
|
17516
17995
|
module.exports = LocalAudioTrackStats;
|
|
17517
17996
|
|
|
17518
|
-
},{"./localtrackstats":
|
|
17997
|
+
},{"./localtrackstats":93}],93:[function(require,module,exports){
|
|
17519
17998
|
'use strict';
|
|
17520
17999
|
var __extends = (this && this.__extends) || (function () {
|
|
17521
18000
|
var extendStatics = function (d, b) {
|
|
@@ -17575,7 +18054,7 @@ var LocalTrackStats = /** @class */ (function (_super) {
|
|
|
17575
18054
|
}(TrackStats));
|
|
17576
18055
|
module.exports = LocalTrackStats;
|
|
17577
18056
|
|
|
17578
|
-
},{"./trackstats":
|
|
18057
|
+
},{"./trackstats":118}],94:[function(require,module,exports){
|
|
17579
18058
|
'use strict';
|
|
17580
18059
|
var __extends = (this && this.__extends) || (function () {
|
|
17581
18060
|
var extendStatics = function (d, b) {
|
|
@@ -17668,7 +18147,7 @@ var LocalVideoTrackStats = /** @class */ (function (_super) {
|
|
|
17668
18147
|
}(LocalTrackStats));
|
|
17669
18148
|
module.exports = LocalVideoTrackStats;
|
|
17670
18149
|
|
|
17671
|
-
},{"./localtrackstats":
|
|
18150
|
+
},{"./localtrackstats":93}],95:[function(require,module,exports){
|
|
17672
18151
|
'use strict';
|
|
17673
18152
|
var __extends = (this && this.__extends) || (function () {
|
|
17674
18153
|
var extendStatics = function (d, b) {
|
|
@@ -17702,7 +18181,7 @@ var NetworkQualityAudioStats = /** @class */ (function (_super) {
|
|
|
17702
18181
|
}(NetworkQualityMediaStats));
|
|
17703
18182
|
module.exports = NetworkQualityAudioStats;
|
|
17704
18183
|
|
|
17705
|
-
},{"./networkqualitymediastats":
|
|
18184
|
+
},{"./networkqualitymediastats":99}],96:[function(require,module,exports){
|
|
17706
18185
|
'use strict';
|
|
17707
18186
|
/**
|
|
17708
18187
|
* Bandwidth network quality statistics.
|
|
@@ -17736,7 +18215,7 @@ var NetworkQualityBandwidthStats = /** @class */ (function () {
|
|
|
17736
18215
|
}());
|
|
17737
18216
|
module.exports = NetworkQualityBandwidthStats;
|
|
17738
18217
|
|
|
17739
|
-
},{}],
|
|
18218
|
+
},{}],97:[function(require,module,exports){
|
|
17740
18219
|
'use strict';
|
|
17741
18220
|
/**
|
|
17742
18221
|
* Fraction lost network quality statistics.
|
|
@@ -17765,7 +18244,7 @@ var NetworkQualityFractionLostStats = /** @class */ (function () {
|
|
|
17765
18244
|
}());
|
|
17766
18245
|
module.exports = NetworkQualityFractionLostStats;
|
|
17767
18246
|
|
|
17768
|
-
},{}],
|
|
18247
|
+
},{}],98:[function(require,module,exports){
|
|
17769
18248
|
'use strict';
|
|
17770
18249
|
/**
|
|
17771
18250
|
* Latency network quality statistics.
|
|
@@ -17799,7 +18278,7 @@ var NetworkQualityLatencyStats = /** @class */ (function () {
|
|
|
17799
18278
|
}());
|
|
17800
18279
|
module.exports = NetworkQualityLatencyStats;
|
|
17801
18280
|
|
|
17802
|
-
},{}],
|
|
18281
|
+
},{}],99:[function(require,module,exports){
|
|
17803
18282
|
'use strict';
|
|
17804
18283
|
var NetworkQualitySendStats = require('./networkqualitysendstats');
|
|
17805
18284
|
var NetworkQualityRecvStats = require('./networkqualityrecvstats');
|
|
@@ -17846,7 +18325,7 @@ var NetworkQualityMediaStats = /** @class */ (function () {
|
|
|
17846
18325
|
}());
|
|
17847
18326
|
module.exports = NetworkQualityMediaStats;
|
|
17848
18327
|
|
|
17849
|
-
},{"./networkqualityrecvstats":
|
|
18328
|
+
},{"./networkqualityrecvstats":100,"./networkqualitysendstats":102}],100:[function(require,module,exports){
|
|
17850
18329
|
'use strict';
|
|
17851
18330
|
var __extends = (this && this.__extends) || (function () {
|
|
17852
18331
|
var extendStatics = function (d, b) {
|
|
@@ -17881,7 +18360,7 @@ var NetworkQualityRecvStats = /** @class */ (function (_super) {
|
|
|
17881
18360
|
}(NetworkQualitySendOrRecvStats));
|
|
17882
18361
|
module.exports = NetworkQualityRecvStats;
|
|
17883
18362
|
|
|
17884
|
-
},{"./networkqualitysendorrecvstats":
|
|
18363
|
+
},{"./networkqualitysendorrecvstats":101}],101:[function(require,module,exports){
|
|
17885
18364
|
'use strict';
|
|
17886
18365
|
var NetworkQualityBandwidthStats = require('./networkqualitybandwidthstats');
|
|
17887
18366
|
var NetworkQualityFractionLostStats = require('./networkqualityfractionloststats');
|
|
@@ -17921,7 +18400,7 @@ var NetworkQualitySendOrRecvStats = /** @class */ (function () {
|
|
|
17921
18400
|
}());
|
|
17922
18401
|
module.exports = NetworkQualitySendOrRecvStats;
|
|
17923
18402
|
|
|
17924
|
-
},{"./networkqualitybandwidthstats":
|
|
18403
|
+
},{"./networkqualitybandwidthstats":96,"./networkqualityfractionloststats":97,"./networkqualitylatencystats":98}],102:[function(require,module,exports){
|
|
17925
18404
|
'use strict';
|
|
17926
18405
|
var __extends = (this && this.__extends) || (function () {
|
|
17927
18406
|
var extendStatics = function (d, b) {
|
|
@@ -17956,7 +18435,7 @@ var NetworkQualitySendStats = /** @class */ (function (_super) {
|
|
|
17956
18435
|
}(NetworkQualitySendOrRecvStats));
|
|
17957
18436
|
module.exports = NetworkQualitySendStats;
|
|
17958
18437
|
|
|
17959
|
-
},{"./networkqualitysendorrecvstats":
|
|
18438
|
+
},{"./networkqualitysendorrecvstats":101}],103:[function(require,module,exports){
|
|
17960
18439
|
'use strict';
|
|
17961
18440
|
var NetworkQualityAudioStats = require('./networkqualityaudiostats');
|
|
17962
18441
|
var NetworkQualityVideoStats = require('./networkqualityvideostats');
|
|
@@ -17996,7 +18475,7 @@ var NetworkQualityStats = /** @class */ (function () {
|
|
|
17996
18475
|
}());
|
|
17997
18476
|
module.exports = NetworkQualityStats;
|
|
17998
18477
|
|
|
17999
|
-
},{"./networkqualityaudiostats":
|
|
18478
|
+
},{"./networkqualityaudiostats":95,"./networkqualityvideostats":104}],104:[function(require,module,exports){
|
|
18000
18479
|
'use strict';
|
|
18001
18480
|
var __extends = (this && this.__extends) || (function () {
|
|
18002
18481
|
var extendStatics = function (d, b) {
|
|
@@ -18030,7 +18509,7 @@ var NetworkQualityVideoStats = /** @class */ (function (_super) {
|
|
|
18030
18509
|
}(NetworkQualityMediaStats));
|
|
18031
18510
|
module.exports = NetworkQualityVideoStats;
|
|
18032
18511
|
|
|
18033
|
-
},{"./networkqualitymediastats":
|
|
18512
|
+
},{"./networkqualitymediastats":99}],105:[function(require,module,exports){
|
|
18034
18513
|
'use strict';
|
|
18035
18514
|
var ReceiverReport = require('./receiverreport');
|
|
18036
18515
|
var SenderReport = require('./senderreport');
|
|
@@ -18108,7 +18587,7 @@ var PeerConnectionReport = /** @class */ (function () {
|
|
|
18108
18587
|
}());
|
|
18109
18588
|
module.exports = PeerConnectionReport;
|
|
18110
18589
|
|
|
18111
|
-
},{"./receiverreport":
|
|
18590
|
+
},{"./receiverreport":107,"./senderreport":114}],106:[function(require,module,exports){
|
|
18112
18591
|
'use strict';
|
|
18113
18592
|
var __read = (this && this.__read) || function (o, n) {
|
|
18114
18593
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -18538,7 +19017,7 @@ function updateChrome(factory) {
|
|
|
18538
19017
|
}
|
|
18539
19018
|
module.exports = PeerConnectionReportFactory;
|
|
18540
19019
|
|
|
18541
|
-
},{"../webrtc/util":
|
|
19020
|
+
},{"../webrtc/util":170,"./icereportfactory":91,"./peerconnectionreport":105,"./receiverreportfactory":108,"./senderreportfactory":115}],107:[function(require,module,exports){
|
|
18542
19021
|
'use strict';
|
|
18543
19022
|
var __extends = (this && this.__extends) || (function () {
|
|
18544
19023
|
var extendStatics = function (d, b) {
|
|
@@ -18664,7 +19143,7 @@ var ReceiverReport = /** @class */ (function (_super) {
|
|
|
18664
19143
|
}(SenderOrReceiverReport));
|
|
18665
19144
|
module.exports = ReceiverReport;
|
|
18666
19145
|
|
|
18667
|
-
},{"./average":
|
|
19146
|
+
},{"./average":89,"./senderorreceiverreport":112,"./sum":117}],108:[function(require,module,exports){
|
|
18668
19147
|
'use strict';
|
|
18669
19148
|
var __extends = (this && this.__extends) || (function () {
|
|
18670
19149
|
var extendStatics = function (d, b) {
|
|
@@ -18723,7 +19202,7 @@ var ReceiverReportFactory = /** @class */ (function (_super) {
|
|
|
18723
19202
|
}(SenderOrReceiverReportFactory));
|
|
18724
19203
|
module.exports = ReceiverReportFactory;
|
|
18725
19204
|
|
|
18726
|
-
},{"./receiverreport":
|
|
19205
|
+
},{"./receiverreport":107,"./senderorreceiverreportfactory":113}],109:[function(require,module,exports){
|
|
18727
19206
|
'use strict';
|
|
18728
19207
|
var __extends = (this && this.__extends) || (function () {
|
|
18729
19208
|
var extendStatics = function (d, b) {
|
|
@@ -18775,7 +19254,7 @@ var RemoteAudioTrackStats = /** @class */ (function (_super) {
|
|
|
18775
19254
|
}(RemoteTrackStats));
|
|
18776
19255
|
module.exports = RemoteAudioTrackStats;
|
|
18777
19256
|
|
|
18778
|
-
},{"./remotetrackstats":
|
|
19257
|
+
},{"./remotetrackstats":110}],110:[function(require,module,exports){
|
|
18779
19258
|
'use strict';
|
|
18780
19259
|
var __extends = (this && this.__extends) || (function () {
|
|
18781
19260
|
var extendStatics = function (d, b) {
|
|
@@ -18827,7 +19306,7 @@ var RemoteTrackStats = /** @class */ (function (_super) {
|
|
|
18827
19306
|
}(TrackStats));
|
|
18828
19307
|
module.exports = RemoteTrackStats;
|
|
18829
19308
|
|
|
18830
|
-
},{"./trackstats":
|
|
19309
|
+
},{"./trackstats":118}],111:[function(require,module,exports){
|
|
18831
19310
|
'use strict';
|
|
18832
19311
|
var __extends = (this && this.__extends) || (function () {
|
|
18833
19312
|
var extendStatics = function (d, b) {
|
|
@@ -18892,7 +19371,7 @@ var RemoteVideoTrackStats = /** @class */ (function (_super) {
|
|
|
18892
19371
|
}(RemoteTrackStats));
|
|
18893
19372
|
module.exports = RemoteVideoTrackStats;
|
|
18894
19373
|
|
|
18895
|
-
},{"./remotetrackstats":
|
|
19374
|
+
},{"./remotetrackstats":110}],112:[function(require,module,exports){
|
|
18896
19375
|
'use strict';
|
|
18897
19376
|
/**
|
|
18898
19377
|
* @property {StatsId} id
|
|
@@ -18926,7 +19405,7 @@ var SenderOrReceiverReport = /** @class */ (function () {
|
|
|
18926
19405
|
}());
|
|
18927
19406
|
module.exports = SenderOrReceiverReport;
|
|
18928
19407
|
|
|
18929
|
-
},{}],
|
|
19408
|
+
},{}],113:[function(require,module,exports){
|
|
18930
19409
|
'use strict';
|
|
18931
19410
|
/**
|
|
18932
19411
|
* @property {StatsId} id
|
|
@@ -18962,7 +19441,7 @@ var SenderOrReceiverReportFactory = /** @class */ (function () {
|
|
|
18962
19441
|
}());
|
|
18963
19442
|
module.exports = SenderOrReceiverReportFactory;
|
|
18964
19443
|
|
|
18965
|
-
},{}],
|
|
19444
|
+
},{}],114:[function(require,module,exports){
|
|
18966
19445
|
/* eslint no-undefined:0 */
|
|
18967
19446
|
'use strict';
|
|
18968
19447
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -19050,7 +19529,7 @@ var SenderReport = /** @class */ (function (_super) {
|
|
|
19050
19529
|
}(SenderOrReceiverReport));
|
|
19051
19530
|
module.exports = SenderReport;
|
|
19052
19531
|
|
|
19053
|
-
},{"./average":
|
|
19532
|
+
},{"./average":89,"./senderorreceiverreport":112,"./sum":117}],115:[function(require,module,exports){
|
|
19054
19533
|
'use strict';
|
|
19055
19534
|
var __extends = (this && this.__extends) || (function () {
|
|
19056
19535
|
var extendStatics = function (d, b) {
|
|
@@ -19109,7 +19588,7 @@ var SenderReportFactory = /** @class */ (function (_super) {
|
|
|
19109
19588
|
}(SenderOrReceiverReportFactory));
|
|
19110
19589
|
module.exports = SenderReportFactory;
|
|
19111
19590
|
|
|
19112
|
-
},{"./senderorreceiverreportfactory":
|
|
19591
|
+
},{"./senderorreceiverreportfactory":113,"./senderreport":114}],116:[function(require,module,exports){
|
|
19113
19592
|
'use strict';
|
|
19114
19593
|
var LocalAudioTrackStats = require('./localaudiotrackstats');
|
|
19115
19594
|
var LocalVideoTrackStats = require('./localvideotrackstats');
|
|
@@ -19160,7 +19639,7 @@ var StatsReport = /** @class */ (function () {
|
|
|
19160
19639
|
}());
|
|
19161
19640
|
module.exports = StatsReport;
|
|
19162
19641
|
|
|
19163
|
-
},{"./localaudiotrackstats":
|
|
19642
|
+
},{"./localaudiotrackstats":92,"./localvideotrackstats":94,"./remoteaudiotrackstats":109,"./remotevideotrackstats":111}],117:[function(require,module,exports){
|
|
19164
19643
|
'use strict';
|
|
19165
19644
|
/**
|
|
19166
19645
|
* @param {Array<number|undefined>} xs
|
|
@@ -19171,7 +19650,7 @@ function sum(xs) {
|
|
|
19171
19650
|
}
|
|
19172
19651
|
module.exports = sum;
|
|
19173
19652
|
|
|
19174
|
-
},{}],
|
|
19653
|
+
},{}],118:[function(require,module,exports){
|
|
19175
19654
|
'use strict';
|
|
19176
19655
|
/**
|
|
19177
19656
|
* Statistics for a {@link Track}.
|
|
@@ -19230,7 +19709,7 @@ var TrackStats = /** @class */ (function () {
|
|
|
19230
19709
|
}());
|
|
19231
19710
|
module.exports = TrackStats;
|
|
19232
19711
|
|
|
19233
|
-
},{}],
|
|
19712
|
+
},{}],119:[function(require,module,exports){
|
|
19234
19713
|
'use strict';
|
|
19235
19714
|
var __extends = (this && this.__extends) || (function () {
|
|
19236
19715
|
var extendStatics = function (d, b) {
|
|
@@ -19292,7 +19771,7 @@ var TrackTransceiver = /** @class */ (function (_super) {
|
|
|
19292
19771
|
*/
|
|
19293
19772
|
module.exports = TrackTransceiver;
|
|
19294
19773
|
|
|
19295
|
-
},{"events":
|
|
19774
|
+
},{"events":173}],120:[function(require,module,exports){
|
|
19296
19775
|
'use strict';
|
|
19297
19776
|
var __extends = (this && this.__extends) || (function () {
|
|
19298
19777
|
var extendStatics = function (d, b) {
|
|
@@ -19945,7 +20424,7 @@ TwilioConnection.CloseReason = CloseReason;
|
|
|
19945
20424
|
*/
|
|
19946
20425
|
module.exports = TwilioConnection;
|
|
19947
20426
|
|
|
19948
|
-
},{"./statemachine":
|
|
20427
|
+
},{"./statemachine":88,"./util":131,"./util/log":135,"./util/networkmonitor":137,"./util/timeout":145,"ws":175}],121:[function(require,module,exports){
|
|
19949
20428
|
'use strict';
|
|
19950
20429
|
var defer = require('./').defer;
|
|
19951
20430
|
/**
|
|
@@ -20010,7 +20489,7 @@ var AsyncVar = /** @class */ (function () {
|
|
|
20010
20489
|
}());
|
|
20011
20490
|
module.exports = AsyncVar;
|
|
20012
20491
|
|
|
20013
|
-
},{"./":
|
|
20492
|
+
},{"./":131}],122:[function(require,module,exports){
|
|
20014
20493
|
/**
|
|
20015
20494
|
* Expose `Backoff`.
|
|
20016
20495
|
*/
|
|
@@ -20094,7 +20573,7 @@ var Backoff = /** @class */ (function () {
|
|
|
20094
20573
|
}());
|
|
20095
20574
|
module.exports = Backoff;
|
|
20096
20575
|
|
|
20097
|
-
},{}],
|
|
20576
|
+
},{}],123:[function(require,module,exports){
|
|
20098
20577
|
/* globals chrome, navigator */
|
|
20099
20578
|
'use strict';
|
|
20100
20579
|
var __read = (this && this.__read) || function (o, n) {
|
|
@@ -20251,7 +20730,7 @@ module.exports = {
|
|
|
20251
20730
|
rebrandedChromeBrowser: rebrandedChromeBrowser
|
|
20252
20731
|
};
|
|
20253
20732
|
|
|
20254
|
-
},{}],
|
|
20733
|
+
},{}],124:[function(require,module,exports){
|
|
20255
20734
|
'use strict';
|
|
20256
20735
|
var __read = (this && this.__read) || function (o, n) {
|
|
20257
20736
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -20394,7 +20873,7 @@ var CancelablePromise = /** @class */ (function () {
|
|
|
20394
20873
|
}());
|
|
20395
20874
|
module.exports = CancelablePromise;
|
|
20396
20875
|
|
|
20397
|
-
},{}],
|
|
20876
|
+
},{}],125:[function(require,module,exports){
|
|
20398
20877
|
'use strict';
|
|
20399
20878
|
/* eslint-disable camelcase */
|
|
20400
20879
|
var packageInfo = require('../../package.json');
|
|
@@ -20496,7 +20975,7 @@ module.exports.videoContentPreferencesMode = {
|
|
|
20496
20975
|
MODE_MANUAL: 'manual'
|
|
20497
20976
|
};
|
|
20498
20977
|
|
|
20499
|
-
},{"../../package.json":
|
|
20978
|
+
},{"../../package.json":174}],126:[function(require,module,exports){
|
|
20500
20979
|
'use strict';
|
|
20501
20980
|
var detectSilence = require('../webaudio/detectsilence');
|
|
20502
20981
|
var N_ATTEMPTS = 3;
|
|
@@ -20537,7 +21016,7 @@ function detectSilentAudio(el) {
|
|
|
20537
21016
|
}
|
|
20538
21017
|
module.exports = detectSilentAudio;
|
|
20539
21018
|
|
|
20540
|
-
},{"../webaudio/audiocontext":
|
|
21019
|
+
},{"../webaudio/audiocontext":152,"../webaudio/detectsilence":153}],127:[function(require,module,exports){
|
|
20541
21020
|
'use strict';
|
|
20542
21021
|
// Cached copy of the <canvas> used to check silent video frames.
|
|
20543
21022
|
var canvas = null;
|
|
@@ -20596,7 +21075,7 @@ function detectSilentVideo(el) {
|
|
|
20596
21075
|
}
|
|
20597
21076
|
module.exports = detectSilentVideo;
|
|
20598
21077
|
|
|
20599
|
-
},{}],
|
|
21078
|
+
},{}],128:[function(require,module,exports){
|
|
20600
21079
|
'use strict';
|
|
20601
21080
|
/**
|
|
20602
21081
|
* The {@link DocumentVisibilityMonitor} monitors the visibility state of the DOM
|
|
@@ -20718,7 +21197,7 @@ var DocumentVisibilityMonitor = /** @class */ (function () {
|
|
|
20718
21197
|
}());
|
|
20719
21198
|
module.exports = new DocumentVisibilityMonitor(2);
|
|
20720
21199
|
|
|
20721
|
-
},{}],
|
|
21200
|
+
},{}],129:[function(require,module,exports){
|
|
20722
21201
|
/* eslint-disable no-console */
|
|
20723
21202
|
'use strict';
|
|
20724
21203
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -20816,7 +21295,7 @@ var EventObserver = /** @class */ (function (_super) {
|
|
|
20816
21295
|
*/
|
|
20817
21296
|
module.exports = EventObserver;
|
|
20818
21297
|
|
|
20819
|
-
},{"events":
|
|
21298
|
+
},{"events":173}],130:[function(require,module,exports){
|
|
20820
21299
|
'use strict';
|
|
20821
21300
|
var Filter = /** @class */ (function () {
|
|
20822
21301
|
function Filter(options) {
|
|
@@ -20860,7 +21339,7 @@ var Filter = /** @class */ (function () {
|
|
|
20860
21339
|
}());
|
|
20861
21340
|
module.exports = Filter;
|
|
20862
21341
|
|
|
20863
|
-
},{}],
|
|
21342
|
+
},{}],131:[function(require,module,exports){
|
|
20864
21343
|
'use strict';
|
|
20865
21344
|
var __extends = (this && this.__extends) || (function () {
|
|
20866
21345
|
var extendStatics = function (d, b) {
|
|
@@ -21757,7 +22236,7 @@ exports.isUserMediaTrack = isUserMediaTrack;
|
|
|
21757
22236
|
exports.waitForSometime = waitForSometime;
|
|
21758
22237
|
exports.waitForEvent = waitForEvent;
|
|
21759
22238
|
|
|
21760
|
-
},{"../webrtc/util":
|
|
22239
|
+
},{"../webrtc/util":170,"./constants":125,"./sid":143,"./twiliowarning":148}],132:[function(require,module,exports){
|
|
21761
22240
|
/* eslint-disable camelcase */
|
|
21762
22241
|
'use strict';
|
|
21763
22242
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -22052,7 +22531,7 @@ function reconnect(publisher, token, sdkName, sdkVersion, roomSid, participantSi
|
|
|
22052
22531
|
*/
|
|
22053
22532
|
module.exports = InsightsPublisher;
|
|
22054
22533
|
|
|
22055
|
-
},{"..":
|
|
22534
|
+
},{"..":131,"../../util":131,"../browserdetection":123,"../constants":125,"events":173,"ws":175}],133:[function(require,module,exports){
|
|
22056
22535
|
// eslint-disable-next-line no-warning-comments
|
|
22057
22536
|
// TODO(mroberts): This should be described as implementing some
|
|
22058
22537
|
// InsightsPublisher interface.
|
|
@@ -22097,7 +22576,7 @@ var InsightsPublisher = /** @class */ (function () {
|
|
|
22097
22576
|
}());
|
|
22098
22577
|
module.exports = InsightsPublisher;
|
|
22099
22578
|
|
|
22100
|
-
},{}],
|
|
22579
|
+
},{}],134:[function(require,module,exports){
|
|
22101
22580
|
'use strict';
|
|
22102
22581
|
var defer = require('./').defer;
|
|
22103
22582
|
/**
|
|
@@ -22159,7 +22638,7 @@ var LocalMediaRestartDeferreds = /** @class */ (function () {
|
|
|
22159
22638
|
}());
|
|
22160
22639
|
module.exports = new LocalMediaRestartDeferreds();
|
|
22161
22640
|
|
|
22162
|
-
},{"./":
|
|
22641
|
+
},{"./":131}],135:[function(require,module,exports){
|
|
22163
22642
|
/* eslint new-cap:0 */
|
|
22164
22643
|
'use strict';
|
|
22165
22644
|
var __read = (this && this.__read) || function (o, n) {
|
|
@@ -22446,7 +22925,7 @@ function validateLogLevels(levels) {
|
|
|
22446
22925
|
}
|
|
22447
22926
|
module.exports = Log;
|
|
22448
22927
|
|
|
22449
|
-
},{"../vendor/loglevel":
|
|
22928
|
+
},{"../vendor/loglevel":151,"./constants":125}],136:[function(require,module,exports){
|
|
22450
22929
|
'use strict';
|
|
22451
22930
|
/**
|
|
22452
22931
|
* Calculates the moving average delta for the given pair ofsamples. A sample (S)
|
|
@@ -22493,7 +22972,7 @@ var MovingAverageDelta = /** @class */ (function () {
|
|
|
22493
22972
|
}());
|
|
22494
22973
|
module.exports = MovingAverageDelta;
|
|
22495
22974
|
|
|
22496
|
-
},{}],
|
|
22975
|
+
},{}],137:[function(require,module,exports){
|
|
22497
22976
|
'use strict';
|
|
22498
22977
|
/**
|
|
22499
22978
|
* Monitor the network connection status to detect interruptions and handoffs.
|
|
@@ -22582,7 +23061,7 @@ var NetworkMonitor = /** @class */ (function () {
|
|
|
22582
23061
|
}());
|
|
22583
23062
|
module.exports = NetworkMonitor;
|
|
22584
23063
|
|
|
22585
|
-
},{}],
|
|
23064
|
+
},{}],138:[function(require,module,exports){
|
|
22586
23065
|
/* eslint-disable no-console */
|
|
22587
23066
|
'use strict';
|
|
22588
23067
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -22645,7 +23124,7 @@ var NullResizeObserver = /** @class */ (function (_super) {
|
|
|
22645
23124
|
}(NullObserver));
|
|
22646
23125
|
module.exports = { NullIntersectionObserver: NullIntersectionObserver, NullResizeObserver: NullResizeObserver, NullObserver: NullObserver };
|
|
22647
23126
|
|
|
22648
|
-
},{}],
|
|
23127
|
+
},{}],139:[function(require,module,exports){
|
|
22649
23128
|
'use strict';
|
|
22650
23129
|
var __read = (this && this.__read) || function (o, n) {
|
|
22651
23130
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -23183,7 +23662,7 @@ exports.revertSimulcast = revertSimulcast;
|
|
|
23183
23662
|
exports.setCodecPreferences = setCodecPreferences;
|
|
23184
23663
|
exports.setSimulcast = setSimulcast;
|
|
23185
23664
|
|
|
23186
|
-
},{"../":
|
|
23665
|
+
},{"../":131,"./simulcast":141}],140:[function(require,module,exports){
|
|
23187
23666
|
'use strict';
|
|
23188
23667
|
var RTCSessionDescription = require('../../webrtc').RTCSessionDescription;
|
|
23189
23668
|
var _a = require('./'), createPtToCodecName = _a.createPtToCodecName, getMediaSections = _a.getMediaSections;
|
|
@@ -23376,7 +23855,7 @@ function addFmtpAttributeForRtxPt(mediaSection, rtxPt, pt) {
|
|
|
23376
23855
|
}
|
|
23377
23856
|
module.exports = workaround;
|
|
23378
23857
|
|
|
23379
|
-
},{"../../webrtc":
|
|
23858
|
+
},{"../../webrtc":157,"./":139}],141:[function(require,module,exports){
|
|
23380
23859
|
'use strict';
|
|
23381
23860
|
var __read = (this && this.__read) || function (o, n) {
|
|
23382
23861
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -23639,7 +24118,7 @@ function setSimulcastInMediaSection(section, trackIdsToAttributes) {
|
|
|
23639
24118
|
*/
|
|
23640
24119
|
module.exports = setSimulcastInMediaSection;
|
|
23641
24120
|
|
|
23642
|
-
},{"../":
|
|
24121
|
+
},{"../":131}],142:[function(require,module,exports){
|
|
23643
24122
|
'use strict';
|
|
23644
24123
|
var getMediaSections = require('./').getMediaSections;
|
|
23645
24124
|
/**
|
|
@@ -23684,7 +24163,7 @@ var TrackMatcher = /** @class */ (function () {
|
|
|
23684
24163
|
}());
|
|
23685
24164
|
module.exports = TrackMatcher;
|
|
23686
24165
|
|
|
23687
|
-
},{"./":
|
|
24166
|
+
},{"./":139}],143:[function(require,module,exports){
|
|
23688
24167
|
var SID_CHARS = '1234567890abcdef';
|
|
23689
24168
|
var SID_CHAR_LENGTH = 32;
|
|
23690
24169
|
// copied from: https://code.hq.twilio.com/flex/monkey/blob/0fdce2b6c52d6be0b17a5cdb92f0c54f119b8ea8/src/client/lib/sid.ts#L39
|
|
@@ -23703,9 +24182,10 @@ function createSID(prefix) {
|
|
|
23703
24182
|
exports.sessionSID = createSID('SS');
|
|
23704
24183
|
exports.createSID = createSID;
|
|
23705
24184
|
|
|
23706
|
-
},{}],
|
|
24185
|
+
},{}],144:[function(require,module,exports){
|
|
23707
24186
|
'use strict';
|
|
23708
24187
|
var _a = require('../webrtc/util'), guessBrowser = _a.guessBrowser, isWebRTCSupported = _a.support;
|
|
24188
|
+
var getSdpFormat = require('../webrtc/util/sdp').getSdpFormat;
|
|
23709
24189
|
var _b = require('./browserdetection'), isAndroid = _b.isAndroid, isMobile = _b.isMobile, isNonChromiumEdge = _b.isNonChromiumEdge, rebrandedChromeBrowser = _b.rebrandedChromeBrowser, mobileWebKitBrowser = _b.mobileWebKitBrowser;
|
|
23710
24190
|
var SUPPORTED_CHROME_BASED_BROWSERS = [
|
|
23711
24191
|
'crios',
|
|
@@ -23741,6 +24221,7 @@ function isSupported() {
|
|
|
23741
24221
|
SUPPORTED_ANDROID_BROWSERS : SUPPORTED_IOS_BROWSERS;
|
|
23742
24222
|
return !!browser
|
|
23743
24223
|
&& isWebRTCSupported()
|
|
24224
|
+
&& getSdpFormat() === 'unified'
|
|
23744
24225
|
&& (!rebrandedChrome || SUPPORTED_CHROME_BASED_BROWSERS.includes(rebrandedChrome))
|
|
23745
24226
|
&& !isNonChromiumEdge(browser)
|
|
23746
24227
|
&& (!mobileWebKit || SUPPORTED_MOBILE_WEBKIT_BASED_BROWSERS.includes(mobileWebKit))
|
|
@@ -23748,7 +24229,7 @@ function isSupported() {
|
|
|
23748
24229
|
}
|
|
23749
24230
|
module.exports = isSupported;
|
|
23750
24231
|
|
|
23751
|
-
},{"../webrtc/util":
|
|
24232
|
+
},{"../webrtc/util":170,"../webrtc/util/sdp":172,"./browserdetection":123}],145:[function(require,module,exports){
|
|
23752
24233
|
'use strict';
|
|
23753
24234
|
/**
|
|
23754
24235
|
* A {@link Timeout} represents a resettable and clearable timeout.
|
|
@@ -23843,7 +24324,7 @@ var Timeout = /** @class */ (function () {
|
|
|
23843
24324
|
}());
|
|
23844
24325
|
module.exports = Timeout;
|
|
23845
24326
|
|
|
23846
|
-
},{}],
|
|
24327
|
+
},{}],146:[function(require,module,exports){
|
|
23847
24328
|
// NOTE: Do not edit this file. This code is auto-generated. Contact the
|
|
23848
24329
|
// Twilio SDK Team for more information.
|
|
23849
24330
|
'use strict';
|
|
@@ -24867,7 +25348,7 @@ var ConfigurationAcquireTurnFailedError = /** @class */ (function (_super) {
|
|
|
24867
25348
|
exports.ConfigurationAcquireTurnFailedError = ConfigurationAcquireTurnFailedError;
|
|
24868
25349
|
Object.defineProperty(TwilioErrorByCode, 53501, { value: ConfigurationAcquireTurnFailedError });
|
|
24869
25350
|
|
|
24870
|
-
},{"./twilioerror":
|
|
25351
|
+
},{"./twilioerror":147}],147:[function(require,module,exports){
|
|
24871
25352
|
'use strict';
|
|
24872
25353
|
var __extends = (this && this.__extends) || (function () {
|
|
24873
25354
|
var extendStatics = function (d, b) {
|
|
@@ -24949,7 +25430,7 @@ var TwilioError = /** @class */ (function (_super) {
|
|
|
24949
25430
|
}(Error));
|
|
24950
25431
|
module.exports = TwilioError;
|
|
24951
25432
|
|
|
24952
|
-
},{}],
|
|
25433
|
+
},{}],148:[function(require,module,exports){
|
|
24953
25434
|
'use strict';
|
|
24954
25435
|
/**
|
|
24955
25436
|
* @private
|
|
@@ -24962,7 +25443,7 @@ var TwilioWarning = {
|
|
|
24962
25443
|
};
|
|
24963
25444
|
module.exports = TwilioWarning;
|
|
24964
25445
|
|
|
24965
|
-
},{}],
|
|
25446
|
+
},{}],149:[function(require,module,exports){
|
|
24966
25447
|
'use strict';
|
|
24967
25448
|
var isNonArrayObject = require('./').isNonArrayObject;
|
|
24968
25449
|
var _a = require('./constants'), E = _a.typeErrors, clientTrackSwitchOffControl = _a.clientTrackSwitchOffControl, videoContentPreferencesMode = _a.videoContentPreferencesMode, subscriptionMode = _a.subscriptionMode, trackPriority = _a.trackPriority, trackSwitchOffMode = _a.trackSwitchOffMode;
|
|
@@ -25079,7 +25560,7 @@ exports.validateBandwidthProfile = validateBandwidthProfile;
|
|
|
25079
25560
|
exports.validateLocalTrack = validateLocalTrack;
|
|
25080
25561
|
exports.validateObject = validateObject;
|
|
25081
25562
|
|
|
25082
|
-
},{"./":
|
|
25563
|
+
},{"./":131,"./constants":125}],150:[function(require,module,exports){
|
|
25083
25564
|
/**
|
|
25084
25565
|
* Copyright (c) 2011-2022 Isaac Z. Schlueter
|
|
25085
25566
|
* Licensed under the ISC License.
|
|
@@ -25114,7 +25595,7 @@ module.exports = function inherits(ctor, superCtor) {
|
|
|
25114
25595
|
}
|
|
25115
25596
|
};
|
|
25116
25597
|
|
|
25117
|
-
},{}],
|
|
25598
|
+
},{}],151:[function(require,module,exports){
|
|
25118
25599
|
/**
|
|
25119
25600
|
* Copyright (c) 2013 Tim Perry
|
|
25120
25601
|
* Licensed under the MIT license.
|
|
@@ -25354,7 +25835,7 @@ defaultLogger.getLoggers = function getLoggers() {
|
|
|
25354
25835
|
defaultLogger['default'] = defaultLogger;
|
|
25355
25836
|
module.exports = defaultLogger;
|
|
25356
25837
|
|
|
25357
|
-
},{}],
|
|
25838
|
+
},{}],152:[function(require,module,exports){
|
|
25358
25839
|
/* globals webkitAudioContext, AudioContext */
|
|
25359
25840
|
'use strict';
|
|
25360
25841
|
var NativeAudioContext = typeof AudioContext !== 'undefined'
|
|
@@ -25437,7 +25918,7 @@ var AudioContextFactory = /** @class */ (function () {
|
|
|
25437
25918
|
}());
|
|
25438
25919
|
module.exports = new AudioContextFactory();
|
|
25439
25920
|
|
|
25440
|
-
},{}],
|
|
25921
|
+
},{}],153:[function(require,module,exports){
|
|
25441
25922
|
'use strict';
|
|
25442
25923
|
/**
|
|
25443
25924
|
* Return a Promise that resolves after `timeout` milliseconds.
|
|
@@ -25490,7 +25971,7 @@ function detectSilence(audioContext, stream, timeout) {
|
|
|
25490
25971
|
}
|
|
25491
25972
|
module.exports = detectSilence;
|
|
25492
25973
|
|
|
25493
|
-
},{}],
|
|
25974
|
+
},{}],154:[function(require,module,exports){
|
|
25494
25975
|
'use strict';
|
|
25495
25976
|
var detectSilence = require('./detectsilence');
|
|
25496
25977
|
/**
|
|
@@ -25560,7 +26041,7 @@ to get a new one, but we\'ve run out of retries; returning it anyway.');
|
|
|
25560
26041
|
}
|
|
25561
26042
|
module.exports = workaround;
|
|
25562
26043
|
|
|
25563
|
-
},{"./audiocontext":
|
|
26044
|
+
},{"./audiocontext":152,"./detectsilence":153}],155:[function(require,module,exports){
|
|
25564
26045
|
'use strict';
|
|
25565
26046
|
var flatMap = require('./util').flatMap;
|
|
25566
26047
|
var guessBrowser = require('./util').guessBrowser;
|
|
@@ -26354,7 +26835,7 @@ function standardizeFirefoxStats(response, isRemote) {
|
|
|
26354
26835
|
*/
|
|
26355
26836
|
module.exports = getStats;
|
|
26356
26837
|
|
|
26357
|
-
},{"./util":
|
|
26838
|
+
},{"./util":170,"./util/sdp":172}],156:[function(require,module,exports){
|
|
26358
26839
|
/* globals navigator */
|
|
26359
26840
|
'use strict';
|
|
26360
26841
|
/**
|
|
@@ -26378,7 +26859,7 @@ function getUserMedia(constraints) {
|
|
|
26378
26859
|
}
|
|
26379
26860
|
module.exports = getUserMedia;
|
|
26380
26861
|
|
|
26381
|
-
},{}],
|
|
26862
|
+
},{}],157:[function(require,module,exports){
|
|
26382
26863
|
'use strict';
|
|
26383
26864
|
var WebRTC = {};
|
|
26384
26865
|
Object.defineProperties(WebRTC, {
|
|
@@ -26413,7 +26894,7 @@ Object.defineProperties(WebRTC, {
|
|
|
26413
26894
|
});
|
|
26414
26895
|
module.exports = WebRTC;
|
|
26415
26896
|
|
|
26416
|
-
},{"./getstats":
|
|
26897
|
+
},{"./getstats":155,"./getusermedia":156,"./mediastream":158,"./mediastreamtrack":159,"./rtcicecandidate":160,"./rtcpeerconnection":163,"./rtcsessiondescription":168}],158:[function(require,module,exports){
|
|
26417
26898
|
/* globals MediaStream */
|
|
26418
26899
|
'use strict';
|
|
26419
26900
|
if (typeof MediaStream === 'function') {
|
|
@@ -26425,7 +26906,7 @@ else {
|
|
|
26425
26906
|
};
|
|
26426
26907
|
}
|
|
26427
26908
|
|
|
26428
|
-
},{}],
|
|
26909
|
+
},{}],159:[function(require,module,exports){
|
|
26429
26910
|
/* global MediaStreamTrack */
|
|
26430
26911
|
'use strict';
|
|
26431
26912
|
if (typeof MediaStreamTrack === 'function') {
|
|
@@ -26437,7 +26918,7 @@ else {
|
|
|
26437
26918
|
};
|
|
26438
26919
|
}
|
|
26439
26920
|
|
|
26440
|
-
},{}],
|
|
26921
|
+
},{}],160:[function(require,module,exports){
|
|
26441
26922
|
/* global RTCIceCandidate */
|
|
26442
26923
|
'use strict';
|
|
26443
26924
|
if (typeof RTCIceCandidate === 'function') {
|
|
@@ -26449,7 +26930,7 @@ else {
|
|
|
26449
26930
|
};
|
|
26450
26931
|
}
|
|
26451
26932
|
|
|
26452
|
-
},{}],
|
|
26933
|
+
},{}],161:[function(require,module,exports){
|
|
26453
26934
|
/* globals RTCDataChannel, RTCPeerConnection, RTCSessionDescription */
|
|
26454
26935
|
'use strict';
|
|
26455
26936
|
var ChromeRTCSessionDescription = require('../rtcsessiondescription/chrome');
|
|
@@ -26960,7 +27441,7 @@ function updateTrackIdsToSSRCs(sdpFormat, tracksToSSRCs, sdp) {
|
|
|
26960
27441
|
}
|
|
26961
27442
|
module.exports = ChromeRTCPeerConnection;
|
|
26962
27443
|
|
|
26963
|
-
},{"../../vendor/inherits":
|
|
27444
|
+
},{"../../vendor/inherits":150,"../mediastream":158,"../rtcrtpsender":165,"../rtcsessiondescription/chrome":166,"../util":170,"../util/eventtarget":169,"../util/latch":171,"../util/sdp":172}],162:[function(require,module,exports){
|
|
26964
27445
|
/* globals RTCPeerConnection */
|
|
26965
27446
|
'use strict';
|
|
26966
27447
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27255,7 +27736,7 @@ function overwriteWithInitiallyNegotiatedDtlsRole(description, dtlsRole) {
|
|
|
27255
27736
|
}
|
|
27256
27737
|
module.exports = FirefoxRTCPeerConnection;
|
|
27257
27738
|
|
|
27258
|
-
},{"../../vendor/inherits":
|
|
27739
|
+
},{"../../vendor/inherits":150,"../rtcsessiondescription/firefox":167,"../util":170,"../util/eventtarget":169,"../util/sdp":172}],163:[function(require,module,exports){
|
|
27259
27740
|
'use strict';
|
|
27260
27741
|
if (typeof RTCPeerConnection === 'function') {
|
|
27261
27742
|
var guessBrowser = require('../util').guessBrowser;
|
|
@@ -27280,7 +27761,7 @@ else {
|
|
|
27280
27761
|
};
|
|
27281
27762
|
}
|
|
27282
27763
|
|
|
27283
|
-
},{"../util":
|
|
27764
|
+
},{"../util":170,"./chrome":161,"./firefox":162,"./safari":164}],164:[function(require,module,exports){
|
|
27284
27765
|
/* globals RTCPeerConnection, RTCSessionDescription */
|
|
27285
27766
|
'use strict';
|
|
27286
27767
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27629,7 +28110,7 @@ function shimDataChannel(dataChannel) {
|
|
|
27629
28110
|
}
|
|
27630
28111
|
module.exports = SafariRTCPeerConnection;
|
|
27631
28112
|
|
|
27632
|
-
},{"../../vendor/inherits":
|
|
28113
|
+
},{"../../vendor/inherits":150,"../util":170,"../util/eventtarget":169,"../util/latch":171,"../util/sdp":172}],165:[function(require,module,exports){
|
|
27633
28114
|
'use strict';
|
|
27634
28115
|
/**
|
|
27635
28116
|
* RTCRtpSender shim.
|
|
@@ -27667,7 +28148,7 @@ function RTCRtpSenderShim(track) {
|
|
|
27667
28148
|
// using the RTCRtpSender APIs.
|
|
27668
28149
|
module.exports = RTCRtpSenderShim;
|
|
27669
28150
|
|
|
27670
|
-
},{}],
|
|
28151
|
+
},{}],166:[function(require,module,exports){
|
|
27671
28152
|
/* globals RTCSessionDescription */
|
|
27672
28153
|
'use strict';
|
|
27673
28154
|
// This class wraps Chrome's RTCSessionDescription implementation. It provides
|
|
@@ -27704,12 +28185,12 @@ function ChromeRTCSessionDescription(descriptionInitDict) {
|
|
|
27704
28185
|
}
|
|
27705
28186
|
module.exports = ChromeRTCSessionDescription;
|
|
27706
28187
|
|
|
27707
|
-
},{}],
|
|
28188
|
+
},{}],167:[function(require,module,exports){
|
|
27708
28189
|
/* globals RTCSessionDescription */
|
|
27709
28190
|
'use strict';
|
|
27710
28191
|
module.exports = RTCSessionDescription;
|
|
27711
28192
|
|
|
27712
|
-
},{}],
|
|
28193
|
+
},{}],168:[function(require,module,exports){
|
|
27713
28194
|
/* globals RTCSessionDescription */
|
|
27714
28195
|
'use strict';
|
|
27715
28196
|
if (typeof RTCSessionDescription === 'function') {
|
|
@@ -27732,7 +28213,7 @@ else {
|
|
|
27732
28213
|
};
|
|
27733
28214
|
}
|
|
27734
28215
|
|
|
27735
|
-
},{"../util":
|
|
28216
|
+
},{"../util":170,"./chrome":166,"./firefox":167}],169:[function(require,module,exports){
|
|
27736
28217
|
'use strict';
|
|
27737
28218
|
var EventEmitter = require('events').EventEmitter;
|
|
27738
28219
|
/**
|
|
@@ -27767,7 +28248,7 @@ EventTarget.prototype.removeEventListener = function removeEventListener() {
|
|
|
27767
28248
|
};
|
|
27768
28249
|
module.exports = EventTarget;
|
|
27769
28250
|
|
|
27770
|
-
},{"events":
|
|
28251
|
+
},{"events":173}],170:[function(require,module,exports){
|
|
27771
28252
|
'use strict';
|
|
27772
28253
|
/**
|
|
27773
28254
|
* Create a {@link Deferred}.
|
|
@@ -28076,7 +28557,7 @@ exports.makeUUID = makeUUID;
|
|
|
28076
28557
|
exports.proxyProperties = proxyProperties;
|
|
28077
28558
|
exports.support = support;
|
|
28078
28559
|
|
|
28079
|
-
},{}],
|
|
28560
|
+
},{}],171:[function(require,module,exports){
|
|
28080
28561
|
'use strict';
|
|
28081
28562
|
var defer = require('./').defer;
|
|
28082
28563
|
var states = {
|
|
@@ -28182,7 +28663,7 @@ function createUnreachableStateError(from, to) {
|
|
|
28182
28663
|
}
|
|
28183
28664
|
module.exports = Latch;
|
|
28184
28665
|
|
|
28185
|
-
},{"./":
|
|
28666
|
+
},{"./":170}],172:[function(require,module,exports){
|
|
28186
28667
|
/* globals RTCPeerConnection, RTCRtpTransceiver */
|
|
28187
28668
|
'use strict';
|
|
28188
28669
|
var flatMap = require('./').flatMap;
|
|
@@ -28215,6 +28696,12 @@ function checkIfSdpSemanticsIsSupported() {
|
|
|
28215
28696
|
// NOTE(mmalavalli): We cache Chrome's SDP format in order to prevent
|
|
28216
28697
|
// instantiation of more than one RTCPeerConnection.
|
|
28217
28698
|
var chromeSdpFormat = null;
|
|
28699
|
+
/**
|
|
28700
|
+
* Clear cached Chrome's SDP format
|
|
28701
|
+
*/
|
|
28702
|
+
function clearChromeCachedSdpFormat() {
|
|
28703
|
+
chromeSdpFormat = null;
|
|
28704
|
+
}
|
|
28218
28705
|
/**
|
|
28219
28706
|
* Get Chrome's default SDP format.
|
|
28220
28707
|
* @returns {'planb'|'unified'}
|
|
@@ -28223,13 +28710,15 @@ function getChromeDefaultSdpFormat() {
|
|
|
28223
28710
|
if (!chromeSdpFormat) {
|
|
28224
28711
|
if (typeof RTCPeerConnection !== 'undefined'
|
|
28225
28712
|
&& 'addTransceiver' in RTCPeerConnection.prototype) {
|
|
28713
|
+
var pc = new RTCPeerConnection();
|
|
28226
28714
|
try {
|
|
28227
|
-
|
|
28715
|
+
pc.addTransceiver('audio');
|
|
28228
28716
|
chromeSdpFormat = 'unified';
|
|
28229
28717
|
}
|
|
28230
28718
|
catch (e) {
|
|
28231
28719
|
chromeSdpFormat = 'planb';
|
|
28232
28720
|
}
|
|
28721
|
+
pc.close();
|
|
28233
28722
|
}
|
|
28234
28723
|
else {
|
|
28235
28724
|
chromeSdpFormat = 'planb';
|
|
@@ -28458,6 +28947,7 @@ function updatePlanBTrackIdsToSSRCs(trackIdsToSSRCs, sdp) {
|
|
|
28458
28947
|
function updateUnifiedPlanTrackIdsToSSRCs(trackIdsToSSRCs, sdp) {
|
|
28459
28948
|
return updateTrackIdsToSSRCs(getUnifiedPlanTrackIdsToSSRCs, trackIdsToSSRCs, sdp);
|
|
28460
28949
|
}
|
|
28950
|
+
exports.clearChromeCachedSdpFormat = clearChromeCachedSdpFormat;
|
|
28461
28951
|
exports.getSdpFormat = getSdpFormat;
|
|
28462
28952
|
exports.getMediaSections = getMediaSections;
|
|
28463
28953
|
exports.getPlanBTrackIds = getPlanBTrackIds;
|
|
@@ -28467,7 +28957,7 @@ exports.getUnifiedPlanSSRCs = getUnifiedPlanSSRCs;
|
|
|
28467
28957
|
exports.updatePlanBTrackIdsToSSRCs = updatePlanBTrackIdsToSSRCs;
|
|
28468
28958
|
exports.updateUnifiedPlanTrackIdsToSSRCs = updateUnifiedPlanTrackIdsToSSRCs;
|
|
28469
28959
|
|
|
28470
|
-
},{"./":
|
|
28960
|
+
},{"./":170}],173:[function(require,module,exports){
|
|
28471
28961
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
28472
28962
|
//
|
|
28473
28963
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -28966,12 +29456,12 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
|
28966
29456
|
}
|
|
28967
29457
|
}
|
|
28968
29458
|
|
|
28969
|
-
},{}],
|
|
29459
|
+
},{}],174:[function(require,module,exports){
|
|
28970
29460
|
module.exports={
|
|
28971
29461
|
"name": "twilio-video",
|
|
28972
29462
|
"title": "Twilio Video",
|
|
28973
29463
|
"description": "Twilio Video JavaScript Library",
|
|
28974
|
-
"version": "2.
|
|
29464
|
+
"version": "2.23.0",
|
|
28975
29465
|
"homepage": "https://twilio.com",
|
|
28976
29466
|
"author": "Mark Andrus Roberts <mroberts@twilio.com>",
|
|
28977
29467
|
"contributors": [
|
|
@@ -29104,7 +29594,7 @@ module.exports={
|
|
|
29104
29594
|
"test:framework:install": "npm install chromedriver && npm install selenium-webdriver && npm install geckodriver && npm install puppeteer",
|
|
29105
29595
|
"test:framework": "npm-run-all test:framework:install test:framework:no-framework test:framework:react",
|
|
29106
29596
|
"test": "npm-run-all test:unit test:integration",
|
|
29107
|
-
"build:es5": "rimraf ./es5 && tsc tsdef/twilio-video-tests.ts --noEmit --lib es2018,dom && tsc
|
|
29597
|
+
"build:es5": "rimraf ./es5 && mkdir -p es5 && cp lib/dynamicImport.js es5/dynamicImport.js && tsc tsdef/twilio-video-tests.ts --noEmit --lib es2018,dom && tsc",
|
|
29108
29598
|
"build:js": "node ./scripts/build.js ./src/twilio-video.js ./LICENSE.md ./dist/twilio-video.js",
|
|
29109
29599
|
"build:min.js": "uglifyjs ./dist/twilio-video.js -o ./dist/twilio-video.min.js --comments \"/^! twilio-video.js/\" -b beautify=false,ascii_only=true",
|
|
29110
29600
|
"build": "npm-run-all clean lint docs test:unit test:integration build:es5 build:js build:min.js test:umd",
|
|
@@ -29125,12 +29615,12 @@ module.exports={
|
|
|
29125
29615
|
}
|
|
29126
29616
|
}
|
|
29127
29617
|
|
|
29128
|
-
},{}],
|
|
29618
|
+
},{}],175:[function(require,module,exports){
|
|
29129
29619
|
module.exports = WebSocket;
|
|
29130
29620
|
|
|
29131
|
-
},{}]},{},[
|
|
29621
|
+
},{}]},{},[12]);
|
|
29132
29622
|
;
|
|
29133
|
-
var Video = bundle(
|
|
29623
|
+
var Video = bundle(12);
|
|
29134
29624
|
/* globals define */
|
|
29135
29625
|
if (typeof define === 'function' && define.amd) {
|
|
29136
29626
|
define([], function() { return Video; });
|