twilio-video 2.22.2 → 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 +45 -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 +675 -212
- 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/room.js +8 -1
- package/es5/signaling/v2/room.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/room.js +13 -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) {
|
|
@@ -14310,7 +14766,7 @@ function setMaxBitrate(params, maxBitrate) {
|
|
|
14310
14766
|
}
|
|
14311
14767
|
module.exports = PeerConnectionV2;
|
|
14312
14768
|
|
|
14313
|
-
},{"../../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){
|
|
14314
14770
|
'use strict';
|
|
14315
14771
|
var __extends = (this && this.__extends) || (function () {
|
|
14316
14772
|
var extendStatics = function (d, b) {
|
|
@@ -14878,7 +15334,7 @@ function updateConnectionState(pcm) {
|
|
|
14878
15334
|
}
|
|
14879
15335
|
module.exports = PeerConnectionManager;
|
|
14880
15336
|
|
|
14881
|
-
},{"../../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){
|
|
14882
15338
|
/* eslint callback-return:0 */
|
|
14883
15339
|
'use strict';
|
|
14884
15340
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -14964,7 +15420,7 @@ var PublisherHintsSignaling = /** @class */ (function (_super) {
|
|
|
14964
15420
|
}(MediaSignaling));
|
|
14965
15421
|
module.exports = PublisherHintsSignaling;
|
|
14966
15422
|
|
|
14967
|
-
},{"./mediasignaling":
|
|
15423
|
+
},{"./mediasignaling":74}],80:[function(require,module,exports){
|
|
14968
15424
|
'use strict';
|
|
14969
15425
|
var __extends = (this && this.__extends) || (function () {
|
|
14970
15426
|
var extendStatics = function (d, b) {
|
|
@@ -15024,7 +15480,7 @@ var RecordingV2 = /** @class */ (function (_super) {
|
|
|
15024
15480
|
*/
|
|
15025
15481
|
module.exports = RecordingV2;
|
|
15026
15482
|
|
|
15027
|
-
},{"../recording":
|
|
15483
|
+
},{"../recording":62}],81:[function(require,module,exports){
|
|
15028
15484
|
'use strict';
|
|
15029
15485
|
var __extends = (this && this.__extends) || (function () {
|
|
15030
15486
|
var extendStatics = function (d, b) {
|
|
@@ -15144,7 +15600,7 @@ var RemoteParticipantV2 = /** @class */ (function (_super) {
|
|
|
15144
15600
|
}(RemoteParticipantSignaling));
|
|
15145
15601
|
module.exports = RemoteParticipantV2;
|
|
15146
15602
|
|
|
15147
|
-
},{"../remoteparticipant":
|
|
15603
|
+
},{"../remoteparticipant":63,"./remotetrackpublication":82}],82:[function(require,module,exports){
|
|
15148
15604
|
'use strict';
|
|
15149
15605
|
var __extends = (this && this.__extends) || (function () {
|
|
15150
15606
|
var extendStatics = function (d, b) {
|
|
@@ -15198,7 +15654,7 @@ var RemoteTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
15198
15654
|
*/
|
|
15199
15655
|
module.exports = RemoteTrackPublicationV2;
|
|
15200
15656
|
|
|
15201
|
-
},{"../remotetrackpublication":
|
|
15657
|
+
},{"../remotetrackpublication":64}],83:[function(require,module,exports){
|
|
15202
15658
|
/* eslint callback-return:0 */
|
|
15203
15659
|
'use strict';
|
|
15204
15660
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -15349,7 +15805,7 @@ var RenderHintsSignaling = /** @class */ (function (_super) {
|
|
|
15349
15805
|
}(MediaSignaling));
|
|
15350
15806
|
module.exports = RenderHintsSignaling;
|
|
15351
15807
|
|
|
15352
|
-
},{"../../util":
|
|
15808
|
+
},{"../../util":131,"../../util/timeout":145,"./mediasignaling":74}],84:[function(require,module,exports){
|
|
15353
15809
|
/* eslint-disable no-console */
|
|
15354
15810
|
'use strict';
|
|
15355
15811
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -15421,6 +15877,13 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15421
15877
|
statsPublishIntervalMs: STATS_PUBLISH_INTERVAL_MS
|
|
15422
15878
|
}, options);
|
|
15423
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);
|
|
15424
15887
|
peerConnectionManager.setIceReconnectTimeout(options.sessionTimeout);
|
|
15425
15888
|
_this = _super.call(this, localParticipant, initialState.sid, initialState.name, options) || this;
|
|
15426
15889
|
var getTrackReceiver = function (id) { return _this._getTrackReceiver(id); };
|
|
@@ -15512,7 +15975,7 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15512
15975
|
periodicallyPublishStats(_this, transport, options.statsPublishIntervalMs);
|
|
15513
15976
|
_this._update(initialState);
|
|
15514
15977
|
// NOTE(mpatwardhan) after initial state we know if publisher_hints are enabled or not
|
|
15515
|
-
// 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.
|
|
15516
15979
|
_this._peerConnectionManager.setEffectiveAdaptiveSimulcast(_this._publisherHintsSignaling.isSetup);
|
|
15517
15980
|
return _this;
|
|
15518
15981
|
}
|
|
@@ -16200,7 +16663,7 @@ function replaceNullsWithDefaults(activeIceCandidatePair, peerConnectionId) {
|
|
|
16200
16663
|
}
|
|
16201
16664
|
module.exports = RoomV2;
|
|
16202
16665
|
|
|
16203
|
-
},{"../../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){
|
|
16204
16667
|
'use strict';
|
|
16205
16668
|
var __extends = (this && this.__extends) || (function () {
|
|
16206
16669
|
var extendStatics = function (d, b) {
|
|
@@ -16266,7 +16729,7 @@ var TrackPrioritySignaling = /** @class */ (function (_super) {
|
|
|
16266
16729
|
}(MediaSignaling));
|
|
16267
16730
|
module.exports = TrackPrioritySignaling;
|
|
16268
16731
|
|
|
16269
|
-
},{"./mediasignaling":
|
|
16732
|
+
},{"./mediasignaling":74}],86:[function(require,module,exports){
|
|
16270
16733
|
'use strict';
|
|
16271
16734
|
var __extends = (this && this.__extends) || (function () {
|
|
16272
16735
|
var extendStatics = function (d, b) {
|
|
@@ -16324,7 +16787,7 @@ var TrackSwitchOffSignaling = /** @class */ (function (_super) {
|
|
|
16324
16787
|
*/
|
|
16325
16788
|
module.exports = TrackSwitchOffSignaling;
|
|
16326
16789
|
|
|
16327
|
-
},{"./mediasignaling":
|
|
16790
|
+
},{"./mediasignaling":74}],87:[function(require,module,exports){
|
|
16328
16791
|
'use strict';
|
|
16329
16792
|
var __extends = (this && this.__extends) || (function () {
|
|
16330
16793
|
var extendStatics = function (d, b) {
|
|
@@ -16911,7 +17374,7 @@ function setupTransport(transport) {
|
|
|
16911
17374
|
}
|
|
16912
17375
|
module.exports = TwilioConnectionTransport;
|
|
16913
17376
|
|
|
16914
|
-
},{"../../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){
|
|
16915
17378
|
'use strict';
|
|
16916
17379
|
var __extends = (this && this.__extends) || (function () {
|
|
16917
17380
|
var extendStatics = function (d, b) {
|
|
@@ -17357,7 +17820,7 @@ function createUnreachableError(here, there) {
|
|
|
17357
17820
|
}
|
|
17358
17821
|
module.exports = StateMachine;
|
|
17359
17822
|
|
|
17360
|
-
},{"./util":
|
|
17823
|
+
},{"./util":131,"events":173}],89:[function(require,module,exports){
|
|
17361
17824
|
/* eslint no-undefined:0 */
|
|
17362
17825
|
'use strict';
|
|
17363
17826
|
/**
|
|
@@ -17370,7 +17833,7 @@ function average(xs) {
|
|
|
17370
17833
|
}
|
|
17371
17834
|
module.exports = average;
|
|
17372
17835
|
|
|
17373
|
-
},{}],
|
|
17836
|
+
},{}],90:[function(require,module,exports){
|
|
17374
17837
|
'use strict';
|
|
17375
17838
|
/**
|
|
17376
17839
|
* @property {number} [availableSend] - bps (undefined in Firefox)
|
|
@@ -17428,7 +17891,7 @@ var IceReport = /** @class */ (function () {
|
|
|
17428
17891
|
}());
|
|
17429
17892
|
module.exports = IceReport;
|
|
17430
17893
|
|
|
17431
|
-
},{}],
|
|
17894
|
+
},{}],91:[function(require,module,exports){
|
|
17432
17895
|
'use strict';
|
|
17433
17896
|
var IceReport = require('./icereport');
|
|
17434
17897
|
/**
|
|
@@ -17473,7 +17936,7 @@ var IceReportFactory = /** @class */ (function () {
|
|
|
17473
17936
|
}());
|
|
17474
17937
|
module.exports = IceReportFactory;
|
|
17475
17938
|
|
|
17476
|
-
},{"./icereport":
|
|
17939
|
+
},{"./icereport":90}],92:[function(require,module,exports){
|
|
17477
17940
|
'use strict';
|
|
17478
17941
|
var __extends = (this && this.__extends) || (function () {
|
|
17479
17942
|
var extendStatics = function (d, b) {
|
|
@@ -17531,7 +17994,7 @@ var LocalAudioTrackStats = /** @class */ (function (_super) {
|
|
|
17531
17994
|
*/
|
|
17532
17995
|
module.exports = LocalAudioTrackStats;
|
|
17533
17996
|
|
|
17534
|
-
},{"./localtrackstats":
|
|
17997
|
+
},{"./localtrackstats":93}],93:[function(require,module,exports){
|
|
17535
17998
|
'use strict';
|
|
17536
17999
|
var __extends = (this && this.__extends) || (function () {
|
|
17537
18000
|
var extendStatics = function (d, b) {
|
|
@@ -17591,7 +18054,7 @@ var LocalTrackStats = /** @class */ (function (_super) {
|
|
|
17591
18054
|
}(TrackStats));
|
|
17592
18055
|
module.exports = LocalTrackStats;
|
|
17593
18056
|
|
|
17594
|
-
},{"./trackstats":
|
|
18057
|
+
},{"./trackstats":118}],94:[function(require,module,exports){
|
|
17595
18058
|
'use strict';
|
|
17596
18059
|
var __extends = (this && this.__extends) || (function () {
|
|
17597
18060
|
var extendStatics = function (d, b) {
|
|
@@ -17684,7 +18147,7 @@ var LocalVideoTrackStats = /** @class */ (function (_super) {
|
|
|
17684
18147
|
}(LocalTrackStats));
|
|
17685
18148
|
module.exports = LocalVideoTrackStats;
|
|
17686
18149
|
|
|
17687
|
-
},{"./localtrackstats":
|
|
18150
|
+
},{"./localtrackstats":93}],95:[function(require,module,exports){
|
|
17688
18151
|
'use strict';
|
|
17689
18152
|
var __extends = (this && this.__extends) || (function () {
|
|
17690
18153
|
var extendStatics = function (d, b) {
|
|
@@ -17718,7 +18181,7 @@ var NetworkQualityAudioStats = /** @class */ (function (_super) {
|
|
|
17718
18181
|
}(NetworkQualityMediaStats));
|
|
17719
18182
|
module.exports = NetworkQualityAudioStats;
|
|
17720
18183
|
|
|
17721
|
-
},{"./networkqualitymediastats":
|
|
18184
|
+
},{"./networkqualitymediastats":99}],96:[function(require,module,exports){
|
|
17722
18185
|
'use strict';
|
|
17723
18186
|
/**
|
|
17724
18187
|
* Bandwidth network quality statistics.
|
|
@@ -17752,7 +18215,7 @@ var NetworkQualityBandwidthStats = /** @class */ (function () {
|
|
|
17752
18215
|
}());
|
|
17753
18216
|
module.exports = NetworkQualityBandwidthStats;
|
|
17754
18217
|
|
|
17755
|
-
},{}],
|
|
18218
|
+
},{}],97:[function(require,module,exports){
|
|
17756
18219
|
'use strict';
|
|
17757
18220
|
/**
|
|
17758
18221
|
* Fraction lost network quality statistics.
|
|
@@ -17781,7 +18244,7 @@ var NetworkQualityFractionLostStats = /** @class */ (function () {
|
|
|
17781
18244
|
}());
|
|
17782
18245
|
module.exports = NetworkQualityFractionLostStats;
|
|
17783
18246
|
|
|
17784
|
-
},{}],
|
|
18247
|
+
},{}],98:[function(require,module,exports){
|
|
17785
18248
|
'use strict';
|
|
17786
18249
|
/**
|
|
17787
18250
|
* Latency network quality statistics.
|
|
@@ -17815,7 +18278,7 @@ var NetworkQualityLatencyStats = /** @class */ (function () {
|
|
|
17815
18278
|
}());
|
|
17816
18279
|
module.exports = NetworkQualityLatencyStats;
|
|
17817
18280
|
|
|
17818
|
-
},{}],
|
|
18281
|
+
},{}],99:[function(require,module,exports){
|
|
17819
18282
|
'use strict';
|
|
17820
18283
|
var NetworkQualitySendStats = require('./networkqualitysendstats');
|
|
17821
18284
|
var NetworkQualityRecvStats = require('./networkqualityrecvstats');
|
|
@@ -17862,7 +18325,7 @@ var NetworkQualityMediaStats = /** @class */ (function () {
|
|
|
17862
18325
|
}());
|
|
17863
18326
|
module.exports = NetworkQualityMediaStats;
|
|
17864
18327
|
|
|
17865
|
-
},{"./networkqualityrecvstats":
|
|
18328
|
+
},{"./networkqualityrecvstats":100,"./networkqualitysendstats":102}],100:[function(require,module,exports){
|
|
17866
18329
|
'use strict';
|
|
17867
18330
|
var __extends = (this && this.__extends) || (function () {
|
|
17868
18331
|
var extendStatics = function (d, b) {
|
|
@@ -17897,7 +18360,7 @@ var NetworkQualityRecvStats = /** @class */ (function (_super) {
|
|
|
17897
18360
|
}(NetworkQualitySendOrRecvStats));
|
|
17898
18361
|
module.exports = NetworkQualityRecvStats;
|
|
17899
18362
|
|
|
17900
|
-
},{"./networkqualitysendorrecvstats":
|
|
18363
|
+
},{"./networkqualitysendorrecvstats":101}],101:[function(require,module,exports){
|
|
17901
18364
|
'use strict';
|
|
17902
18365
|
var NetworkQualityBandwidthStats = require('./networkqualitybandwidthstats');
|
|
17903
18366
|
var NetworkQualityFractionLostStats = require('./networkqualityfractionloststats');
|
|
@@ -17937,7 +18400,7 @@ var NetworkQualitySendOrRecvStats = /** @class */ (function () {
|
|
|
17937
18400
|
}());
|
|
17938
18401
|
module.exports = NetworkQualitySendOrRecvStats;
|
|
17939
18402
|
|
|
17940
|
-
},{"./networkqualitybandwidthstats":
|
|
18403
|
+
},{"./networkqualitybandwidthstats":96,"./networkqualityfractionloststats":97,"./networkqualitylatencystats":98}],102:[function(require,module,exports){
|
|
17941
18404
|
'use strict';
|
|
17942
18405
|
var __extends = (this && this.__extends) || (function () {
|
|
17943
18406
|
var extendStatics = function (d, b) {
|
|
@@ -17972,7 +18435,7 @@ var NetworkQualitySendStats = /** @class */ (function (_super) {
|
|
|
17972
18435
|
}(NetworkQualitySendOrRecvStats));
|
|
17973
18436
|
module.exports = NetworkQualitySendStats;
|
|
17974
18437
|
|
|
17975
|
-
},{"./networkqualitysendorrecvstats":
|
|
18438
|
+
},{"./networkqualitysendorrecvstats":101}],103:[function(require,module,exports){
|
|
17976
18439
|
'use strict';
|
|
17977
18440
|
var NetworkQualityAudioStats = require('./networkqualityaudiostats');
|
|
17978
18441
|
var NetworkQualityVideoStats = require('./networkqualityvideostats');
|
|
@@ -18012,7 +18475,7 @@ var NetworkQualityStats = /** @class */ (function () {
|
|
|
18012
18475
|
}());
|
|
18013
18476
|
module.exports = NetworkQualityStats;
|
|
18014
18477
|
|
|
18015
|
-
},{"./networkqualityaudiostats":
|
|
18478
|
+
},{"./networkqualityaudiostats":95,"./networkqualityvideostats":104}],104:[function(require,module,exports){
|
|
18016
18479
|
'use strict';
|
|
18017
18480
|
var __extends = (this && this.__extends) || (function () {
|
|
18018
18481
|
var extendStatics = function (d, b) {
|
|
@@ -18046,7 +18509,7 @@ var NetworkQualityVideoStats = /** @class */ (function (_super) {
|
|
|
18046
18509
|
}(NetworkQualityMediaStats));
|
|
18047
18510
|
module.exports = NetworkQualityVideoStats;
|
|
18048
18511
|
|
|
18049
|
-
},{"./networkqualitymediastats":
|
|
18512
|
+
},{"./networkqualitymediastats":99}],105:[function(require,module,exports){
|
|
18050
18513
|
'use strict';
|
|
18051
18514
|
var ReceiverReport = require('./receiverreport');
|
|
18052
18515
|
var SenderReport = require('./senderreport');
|
|
@@ -18124,7 +18587,7 @@ var PeerConnectionReport = /** @class */ (function () {
|
|
|
18124
18587
|
}());
|
|
18125
18588
|
module.exports = PeerConnectionReport;
|
|
18126
18589
|
|
|
18127
|
-
},{"./receiverreport":
|
|
18590
|
+
},{"./receiverreport":107,"./senderreport":114}],106:[function(require,module,exports){
|
|
18128
18591
|
'use strict';
|
|
18129
18592
|
var __read = (this && this.__read) || function (o, n) {
|
|
18130
18593
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -18554,7 +19017,7 @@ function updateChrome(factory) {
|
|
|
18554
19017
|
}
|
|
18555
19018
|
module.exports = PeerConnectionReportFactory;
|
|
18556
19019
|
|
|
18557
|
-
},{"../webrtc/util":
|
|
19020
|
+
},{"../webrtc/util":170,"./icereportfactory":91,"./peerconnectionreport":105,"./receiverreportfactory":108,"./senderreportfactory":115}],107:[function(require,module,exports){
|
|
18558
19021
|
'use strict';
|
|
18559
19022
|
var __extends = (this && this.__extends) || (function () {
|
|
18560
19023
|
var extendStatics = function (d, b) {
|
|
@@ -18680,7 +19143,7 @@ var ReceiverReport = /** @class */ (function (_super) {
|
|
|
18680
19143
|
}(SenderOrReceiverReport));
|
|
18681
19144
|
module.exports = ReceiverReport;
|
|
18682
19145
|
|
|
18683
|
-
},{"./average":
|
|
19146
|
+
},{"./average":89,"./senderorreceiverreport":112,"./sum":117}],108:[function(require,module,exports){
|
|
18684
19147
|
'use strict';
|
|
18685
19148
|
var __extends = (this && this.__extends) || (function () {
|
|
18686
19149
|
var extendStatics = function (d, b) {
|
|
@@ -18739,7 +19202,7 @@ var ReceiverReportFactory = /** @class */ (function (_super) {
|
|
|
18739
19202
|
}(SenderOrReceiverReportFactory));
|
|
18740
19203
|
module.exports = ReceiverReportFactory;
|
|
18741
19204
|
|
|
18742
|
-
},{"./receiverreport":
|
|
19205
|
+
},{"./receiverreport":107,"./senderorreceiverreportfactory":113}],109:[function(require,module,exports){
|
|
18743
19206
|
'use strict';
|
|
18744
19207
|
var __extends = (this && this.__extends) || (function () {
|
|
18745
19208
|
var extendStatics = function (d, b) {
|
|
@@ -18791,7 +19254,7 @@ var RemoteAudioTrackStats = /** @class */ (function (_super) {
|
|
|
18791
19254
|
}(RemoteTrackStats));
|
|
18792
19255
|
module.exports = RemoteAudioTrackStats;
|
|
18793
19256
|
|
|
18794
|
-
},{"./remotetrackstats":
|
|
19257
|
+
},{"./remotetrackstats":110}],110:[function(require,module,exports){
|
|
18795
19258
|
'use strict';
|
|
18796
19259
|
var __extends = (this && this.__extends) || (function () {
|
|
18797
19260
|
var extendStatics = function (d, b) {
|
|
@@ -18843,7 +19306,7 @@ var RemoteTrackStats = /** @class */ (function (_super) {
|
|
|
18843
19306
|
}(TrackStats));
|
|
18844
19307
|
module.exports = RemoteTrackStats;
|
|
18845
19308
|
|
|
18846
|
-
},{"./trackstats":
|
|
19309
|
+
},{"./trackstats":118}],111:[function(require,module,exports){
|
|
18847
19310
|
'use strict';
|
|
18848
19311
|
var __extends = (this && this.__extends) || (function () {
|
|
18849
19312
|
var extendStatics = function (d, b) {
|
|
@@ -18908,7 +19371,7 @@ var RemoteVideoTrackStats = /** @class */ (function (_super) {
|
|
|
18908
19371
|
}(RemoteTrackStats));
|
|
18909
19372
|
module.exports = RemoteVideoTrackStats;
|
|
18910
19373
|
|
|
18911
|
-
},{"./remotetrackstats":
|
|
19374
|
+
},{"./remotetrackstats":110}],112:[function(require,module,exports){
|
|
18912
19375
|
'use strict';
|
|
18913
19376
|
/**
|
|
18914
19377
|
* @property {StatsId} id
|
|
@@ -18942,7 +19405,7 @@ var SenderOrReceiverReport = /** @class */ (function () {
|
|
|
18942
19405
|
}());
|
|
18943
19406
|
module.exports = SenderOrReceiverReport;
|
|
18944
19407
|
|
|
18945
|
-
},{}],
|
|
19408
|
+
},{}],113:[function(require,module,exports){
|
|
18946
19409
|
'use strict';
|
|
18947
19410
|
/**
|
|
18948
19411
|
* @property {StatsId} id
|
|
@@ -18978,7 +19441,7 @@ var SenderOrReceiverReportFactory = /** @class */ (function () {
|
|
|
18978
19441
|
}());
|
|
18979
19442
|
module.exports = SenderOrReceiverReportFactory;
|
|
18980
19443
|
|
|
18981
|
-
},{}],
|
|
19444
|
+
},{}],114:[function(require,module,exports){
|
|
18982
19445
|
/* eslint no-undefined:0 */
|
|
18983
19446
|
'use strict';
|
|
18984
19447
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -19066,7 +19529,7 @@ var SenderReport = /** @class */ (function (_super) {
|
|
|
19066
19529
|
}(SenderOrReceiverReport));
|
|
19067
19530
|
module.exports = SenderReport;
|
|
19068
19531
|
|
|
19069
|
-
},{"./average":
|
|
19532
|
+
},{"./average":89,"./senderorreceiverreport":112,"./sum":117}],115:[function(require,module,exports){
|
|
19070
19533
|
'use strict';
|
|
19071
19534
|
var __extends = (this && this.__extends) || (function () {
|
|
19072
19535
|
var extendStatics = function (d, b) {
|
|
@@ -19125,7 +19588,7 @@ var SenderReportFactory = /** @class */ (function (_super) {
|
|
|
19125
19588
|
}(SenderOrReceiverReportFactory));
|
|
19126
19589
|
module.exports = SenderReportFactory;
|
|
19127
19590
|
|
|
19128
|
-
},{"./senderorreceiverreportfactory":
|
|
19591
|
+
},{"./senderorreceiverreportfactory":113,"./senderreport":114}],116:[function(require,module,exports){
|
|
19129
19592
|
'use strict';
|
|
19130
19593
|
var LocalAudioTrackStats = require('./localaudiotrackstats');
|
|
19131
19594
|
var LocalVideoTrackStats = require('./localvideotrackstats');
|
|
@@ -19176,7 +19639,7 @@ var StatsReport = /** @class */ (function () {
|
|
|
19176
19639
|
}());
|
|
19177
19640
|
module.exports = StatsReport;
|
|
19178
19641
|
|
|
19179
|
-
},{"./localaudiotrackstats":
|
|
19642
|
+
},{"./localaudiotrackstats":92,"./localvideotrackstats":94,"./remoteaudiotrackstats":109,"./remotevideotrackstats":111}],117:[function(require,module,exports){
|
|
19180
19643
|
'use strict';
|
|
19181
19644
|
/**
|
|
19182
19645
|
* @param {Array<number|undefined>} xs
|
|
@@ -19187,7 +19650,7 @@ function sum(xs) {
|
|
|
19187
19650
|
}
|
|
19188
19651
|
module.exports = sum;
|
|
19189
19652
|
|
|
19190
|
-
},{}],
|
|
19653
|
+
},{}],118:[function(require,module,exports){
|
|
19191
19654
|
'use strict';
|
|
19192
19655
|
/**
|
|
19193
19656
|
* Statistics for a {@link Track}.
|
|
@@ -19246,7 +19709,7 @@ var TrackStats = /** @class */ (function () {
|
|
|
19246
19709
|
}());
|
|
19247
19710
|
module.exports = TrackStats;
|
|
19248
19711
|
|
|
19249
|
-
},{}],
|
|
19712
|
+
},{}],119:[function(require,module,exports){
|
|
19250
19713
|
'use strict';
|
|
19251
19714
|
var __extends = (this && this.__extends) || (function () {
|
|
19252
19715
|
var extendStatics = function (d, b) {
|
|
@@ -19308,7 +19771,7 @@ var TrackTransceiver = /** @class */ (function (_super) {
|
|
|
19308
19771
|
*/
|
|
19309
19772
|
module.exports = TrackTransceiver;
|
|
19310
19773
|
|
|
19311
|
-
},{"events":
|
|
19774
|
+
},{"events":173}],120:[function(require,module,exports){
|
|
19312
19775
|
'use strict';
|
|
19313
19776
|
var __extends = (this && this.__extends) || (function () {
|
|
19314
19777
|
var extendStatics = function (d, b) {
|
|
@@ -19961,7 +20424,7 @@ TwilioConnection.CloseReason = CloseReason;
|
|
|
19961
20424
|
*/
|
|
19962
20425
|
module.exports = TwilioConnection;
|
|
19963
20426
|
|
|
19964
|
-
},{"./statemachine":
|
|
20427
|
+
},{"./statemachine":88,"./util":131,"./util/log":135,"./util/networkmonitor":137,"./util/timeout":145,"ws":175}],121:[function(require,module,exports){
|
|
19965
20428
|
'use strict';
|
|
19966
20429
|
var defer = require('./').defer;
|
|
19967
20430
|
/**
|
|
@@ -20026,7 +20489,7 @@ var AsyncVar = /** @class */ (function () {
|
|
|
20026
20489
|
}());
|
|
20027
20490
|
module.exports = AsyncVar;
|
|
20028
20491
|
|
|
20029
|
-
},{"./":
|
|
20492
|
+
},{"./":131}],122:[function(require,module,exports){
|
|
20030
20493
|
/**
|
|
20031
20494
|
* Expose `Backoff`.
|
|
20032
20495
|
*/
|
|
@@ -20110,7 +20573,7 @@ var Backoff = /** @class */ (function () {
|
|
|
20110
20573
|
}());
|
|
20111
20574
|
module.exports = Backoff;
|
|
20112
20575
|
|
|
20113
|
-
},{}],
|
|
20576
|
+
},{}],123:[function(require,module,exports){
|
|
20114
20577
|
/* globals chrome, navigator */
|
|
20115
20578
|
'use strict';
|
|
20116
20579
|
var __read = (this && this.__read) || function (o, n) {
|
|
@@ -20267,7 +20730,7 @@ module.exports = {
|
|
|
20267
20730
|
rebrandedChromeBrowser: rebrandedChromeBrowser
|
|
20268
20731
|
};
|
|
20269
20732
|
|
|
20270
|
-
},{}],
|
|
20733
|
+
},{}],124:[function(require,module,exports){
|
|
20271
20734
|
'use strict';
|
|
20272
20735
|
var __read = (this && this.__read) || function (o, n) {
|
|
20273
20736
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -20410,7 +20873,7 @@ var CancelablePromise = /** @class */ (function () {
|
|
|
20410
20873
|
}());
|
|
20411
20874
|
module.exports = CancelablePromise;
|
|
20412
20875
|
|
|
20413
|
-
},{}],
|
|
20876
|
+
},{}],125:[function(require,module,exports){
|
|
20414
20877
|
'use strict';
|
|
20415
20878
|
/* eslint-disable camelcase */
|
|
20416
20879
|
var packageInfo = require('../../package.json');
|
|
@@ -20512,7 +20975,7 @@ module.exports.videoContentPreferencesMode = {
|
|
|
20512
20975
|
MODE_MANUAL: 'manual'
|
|
20513
20976
|
};
|
|
20514
20977
|
|
|
20515
|
-
},{"../../package.json":
|
|
20978
|
+
},{"../../package.json":174}],126:[function(require,module,exports){
|
|
20516
20979
|
'use strict';
|
|
20517
20980
|
var detectSilence = require('../webaudio/detectsilence');
|
|
20518
20981
|
var N_ATTEMPTS = 3;
|
|
@@ -20553,7 +21016,7 @@ function detectSilentAudio(el) {
|
|
|
20553
21016
|
}
|
|
20554
21017
|
module.exports = detectSilentAudio;
|
|
20555
21018
|
|
|
20556
|
-
},{"../webaudio/audiocontext":
|
|
21019
|
+
},{"../webaudio/audiocontext":152,"../webaudio/detectsilence":153}],127:[function(require,module,exports){
|
|
20557
21020
|
'use strict';
|
|
20558
21021
|
// Cached copy of the <canvas> used to check silent video frames.
|
|
20559
21022
|
var canvas = null;
|
|
@@ -20612,7 +21075,7 @@ function detectSilentVideo(el) {
|
|
|
20612
21075
|
}
|
|
20613
21076
|
module.exports = detectSilentVideo;
|
|
20614
21077
|
|
|
20615
|
-
},{}],
|
|
21078
|
+
},{}],128:[function(require,module,exports){
|
|
20616
21079
|
'use strict';
|
|
20617
21080
|
/**
|
|
20618
21081
|
* The {@link DocumentVisibilityMonitor} monitors the visibility state of the DOM
|
|
@@ -20734,7 +21197,7 @@ var DocumentVisibilityMonitor = /** @class */ (function () {
|
|
|
20734
21197
|
}());
|
|
20735
21198
|
module.exports = new DocumentVisibilityMonitor(2);
|
|
20736
21199
|
|
|
20737
|
-
},{}],
|
|
21200
|
+
},{}],129:[function(require,module,exports){
|
|
20738
21201
|
/* eslint-disable no-console */
|
|
20739
21202
|
'use strict';
|
|
20740
21203
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -20832,7 +21295,7 @@ var EventObserver = /** @class */ (function (_super) {
|
|
|
20832
21295
|
*/
|
|
20833
21296
|
module.exports = EventObserver;
|
|
20834
21297
|
|
|
20835
|
-
},{"events":
|
|
21298
|
+
},{"events":173}],130:[function(require,module,exports){
|
|
20836
21299
|
'use strict';
|
|
20837
21300
|
var Filter = /** @class */ (function () {
|
|
20838
21301
|
function Filter(options) {
|
|
@@ -20876,7 +21339,7 @@ var Filter = /** @class */ (function () {
|
|
|
20876
21339
|
}());
|
|
20877
21340
|
module.exports = Filter;
|
|
20878
21341
|
|
|
20879
|
-
},{}],
|
|
21342
|
+
},{}],131:[function(require,module,exports){
|
|
20880
21343
|
'use strict';
|
|
20881
21344
|
var __extends = (this && this.__extends) || (function () {
|
|
20882
21345
|
var extendStatics = function (d, b) {
|
|
@@ -21773,7 +22236,7 @@ exports.isUserMediaTrack = isUserMediaTrack;
|
|
|
21773
22236
|
exports.waitForSometime = waitForSometime;
|
|
21774
22237
|
exports.waitForEvent = waitForEvent;
|
|
21775
22238
|
|
|
21776
|
-
},{"../webrtc/util":
|
|
22239
|
+
},{"../webrtc/util":170,"./constants":125,"./sid":143,"./twiliowarning":148}],132:[function(require,module,exports){
|
|
21777
22240
|
/* eslint-disable camelcase */
|
|
21778
22241
|
'use strict';
|
|
21779
22242
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -22068,7 +22531,7 @@ function reconnect(publisher, token, sdkName, sdkVersion, roomSid, participantSi
|
|
|
22068
22531
|
*/
|
|
22069
22532
|
module.exports = InsightsPublisher;
|
|
22070
22533
|
|
|
22071
|
-
},{"..":
|
|
22534
|
+
},{"..":131,"../../util":131,"../browserdetection":123,"../constants":125,"events":173,"ws":175}],133:[function(require,module,exports){
|
|
22072
22535
|
// eslint-disable-next-line no-warning-comments
|
|
22073
22536
|
// TODO(mroberts): This should be described as implementing some
|
|
22074
22537
|
// InsightsPublisher interface.
|
|
@@ -22113,7 +22576,7 @@ var InsightsPublisher = /** @class */ (function () {
|
|
|
22113
22576
|
}());
|
|
22114
22577
|
module.exports = InsightsPublisher;
|
|
22115
22578
|
|
|
22116
|
-
},{}],
|
|
22579
|
+
},{}],134:[function(require,module,exports){
|
|
22117
22580
|
'use strict';
|
|
22118
22581
|
var defer = require('./').defer;
|
|
22119
22582
|
/**
|
|
@@ -22175,7 +22638,7 @@ var LocalMediaRestartDeferreds = /** @class */ (function () {
|
|
|
22175
22638
|
}());
|
|
22176
22639
|
module.exports = new LocalMediaRestartDeferreds();
|
|
22177
22640
|
|
|
22178
|
-
},{"./":
|
|
22641
|
+
},{"./":131}],135:[function(require,module,exports){
|
|
22179
22642
|
/* eslint new-cap:0 */
|
|
22180
22643
|
'use strict';
|
|
22181
22644
|
var __read = (this && this.__read) || function (o, n) {
|
|
@@ -22462,7 +22925,7 @@ function validateLogLevels(levels) {
|
|
|
22462
22925
|
}
|
|
22463
22926
|
module.exports = Log;
|
|
22464
22927
|
|
|
22465
|
-
},{"../vendor/loglevel":
|
|
22928
|
+
},{"../vendor/loglevel":151,"./constants":125}],136:[function(require,module,exports){
|
|
22466
22929
|
'use strict';
|
|
22467
22930
|
/**
|
|
22468
22931
|
* Calculates the moving average delta for the given pair ofsamples. A sample (S)
|
|
@@ -22509,7 +22972,7 @@ var MovingAverageDelta = /** @class */ (function () {
|
|
|
22509
22972
|
}());
|
|
22510
22973
|
module.exports = MovingAverageDelta;
|
|
22511
22974
|
|
|
22512
|
-
},{}],
|
|
22975
|
+
},{}],137:[function(require,module,exports){
|
|
22513
22976
|
'use strict';
|
|
22514
22977
|
/**
|
|
22515
22978
|
* Monitor the network connection status to detect interruptions and handoffs.
|
|
@@ -22598,7 +23061,7 @@ var NetworkMonitor = /** @class */ (function () {
|
|
|
22598
23061
|
}());
|
|
22599
23062
|
module.exports = NetworkMonitor;
|
|
22600
23063
|
|
|
22601
|
-
},{}],
|
|
23064
|
+
},{}],138:[function(require,module,exports){
|
|
22602
23065
|
/* eslint-disable no-console */
|
|
22603
23066
|
'use strict';
|
|
22604
23067
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -22661,7 +23124,7 @@ var NullResizeObserver = /** @class */ (function (_super) {
|
|
|
22661
23124
|
}(NullObserver));
|
|
22662
23125
|
module.exports = { NullIntersectionObserver: NullIntersectionObserver, NullResizeObserver: NullResizeObserver, NullObserver: NullObserver };
|
|
22663
23126
|
|
|
22664
|
-
},{}],
|
|
23127
|
+
},{}],139:[function(require,module,exports){
|
|
22665
23128
|
'use strict';
|
|
22666
23129
|
var __read = (this && this.__read) || function (o, n) {
|
|
22667
23130
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -23199,7 +23662,7 @@ exports.revertSimulcast = revertSimulcast;
|
|
|
23199
23662
|
exports.setCodecPreferences = setCodecPreferences;
|
|
23200
23663
|
exports.setSimulcast = setSimulcast;
|
|
23201
23664
|
|
|
23202
|
-
},{"../":
|
|
23665
|
+
},{"../":131,"./simulcast":141}],140:[function(require,module,exports){
|
|
23203
23666
|
'use strict';
|
|
23204
23667
|
var RTCSessionDescription = require('../../webrtc').RTCSessionDescription;
|
|
23205
23668
|
var _a = require('./'), createPtToCodecName = _a.createPtToCodecName, getMediaSections = _a.getMediaSections;
|
|
@@ -23392,7 +23855,7 @@ function addFmtpAttributeForRtxPt(mediaSection, rtxPt, pt) {
|
|
|
23392
23855
|
}
|
|
23393
23856
|
module.exports = workaround;
|
|
23394
23857
|
|
|
23395
|
-
},{"../../webrtc":
|
|
23858
|
+
},{"../../webrtc":157,"./":139}],141:[function(require,module,exports){
|
|
23396
23859
|
'use strict';
|
|
23397
23860
|
var __read = (this && this.__read) || function (o, n) {
|
|
23398
23861
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -23655,7 +24118,7 @@ function setSimulcastInMediaSection(section, trackIdsToAttributes) {
|
|
|
23655
24118
|
*/
|
|
23656
24119
|
module.exports = setSimulcastInMediaSection;
|
|
23657
24120
|
|
|
23658
|
-
},{"../":
|
|
24121
|
+
},{"../":131}],142:[function(require,module,exports){
|
|
23659
24122
|
'use strict';
|
|
23660
24123
|
var getMediaSections = require('./').getMediaSections;
|
|
23661
24124
|
/**
|
|
@@ -23700,7 +24163,7 @@ var TrackMatcher = /** @class */ (function () {
|
|
|
23700
24163
|
}());
|
|
23701
24164
|
module.exports = TrackMatcher;
|
|
23702
24165
|
|
|
23703
|
-
},{"./":
|
|
24166
|
+
},{"./":139}],143:[function(require,module,exports){
|
|
23704
24167
|
var SID_CHARS = '1234567890abcdef';
|
|
23705
24168
|
var SID_CHAR_LENGTH = 32;
|
|
23706
24169
|
// copied from: https://code.hq.twilio.com/flex/monkey/blob/0fdce2b6c52d6be0b17a5cdb92f0c54f119b8ea8/src/client/lib/sid.ts#L39
|
|
@@ -23719,7 +24182,7 @@ function createSID(prefix) {
|
|
|
23719
24182
|
exports.sessionSID = createSID('SS');
|
|
23720
24183
|
exports.createSID = createSID;
|
|
23721
24184
|
|
|
23722
|
-
},{}],
|
|
24185
|
+
},{}],144:[function(require,module,exports){
|
|
23723
24186
|
'use strict';
|
|
23724
24187
|
var _a = require('../webrtc/util'), guessBrowser = _a.guessBrowser, isWebRTCSupported = _a.support;
|
|
23725
24188
|
var getSdpFormat = require('../webrtc/util/sdp').getSdpFormat;
|
|
@@ -23766,7 +24229,7 @@ function isSupported() {
|
|
|
23766
24229
|
}
|
|
23767
24230
|
module.exports = isSupported;
|
|
23768
24231
|
|
|
23769
|
-
},{"../webrtc/util":
|
|
24232
|
+
},{"../webrtc/util":170,"../webrtc/util/sdp":172,"./browserdetection":123}],145:[function(require,module,exports){
|
|
23770
24233
|
'use strict';
|
|
23771
24234
|
/**
|
|
23772
24235
|
* A {@link Timeout} represents a resettable and clearable timeout.
|
|
@@ -23861,7 +24324,7 @@ var Timeout = /** @class */ (function () {
|
|
|
23861
24324
|
}());
|
|
23862
24325
|
module.exports = Timeout;
|
|
23863
24326
|
|
|
23864
|
-
},{}],
|
|
24327
|
+
},{}],146:[function(require,module,exports){
|
|
23865
24328
|
// NOTE: Do not edit this file. This code is auto-generated. Contact the
|
|
23866
24329
|
// Twilio SDK Team for more information.
|
|
23867
24330
|
'use strict';
|
|
@@ -24885,7 +25348,7 @@ var ConfigurationAcquireTurnFailedError = /** @class */ (function (_super) {
|
|
|
24885
25348
|
exports.ConfigurationAcquireTurnFailedError = ConfigurationAcquireTurnFailedError;
|
|
24886
25349
|
Object.defineProperty(TwilioErrorByCode, 53501, { value: ConfigurationAcquireTurnFailedError });
|
|
24887
25350
|
|
|
24888
|
-
},{"./twilioerror":
|
|
25351
|
+
},{"./twilioerror":147}],147:[function(require,module,exports){
|
|
24889
25352
|
'use strict';
|
|
24890
25353
|
var __extends = (this && this.__extends) || (function () {
|
|
24891
25354
|
var extendStatics = function (d, b) {
|
|
@@ -24967,7 +25430,7 @@ var TwilioError = /** @class */ (function (_super) {
|
|
|
24967
25430
|
}(Error));
|
|
24968
25431
|
module.exports = TwilioError;
|
|
24969
25432
|
|
|
24970
|
-
},{}],
|
|
25433
|
+
},{}],148:[function(require,module,exports){
|
|
24971
25434
|
'use strict';
|
|
24972
25435
|
/**
|
|
24973
25436
|
* @private
|
|
@@ -24980,7 +25443,7 @@ var TwilioWarning = {
|
|
|
24980
25443
|
};
|
|
24981
25444
|
module.exports = TwilioWarning;
|
|
24982
25445
|
|
|
24983
|
-
},{}],
|
|
25446
|
+
},{}],149:[function(require,module,exports){
|
|
24984
25447
|
'use strict';
|
|
24985
25448
|
var isNonArrayObject = require('./').isNonArrayObject;
|
|
24986
25449
|
var _a = require('./constants'), E = _a.typeErrors, clientTrackSwitchOffControl = _a.clientTrackSwitchOffControl, videoContentPreferencesMode = _a.videoContentPreferencesMode, subscriptionMode = _a.subscriptionMode, trackPriority = _a.trackPriority, trackSwitchOffMode = _a.trackSwitchOffMode;
|
|
@@ -25097,7 +25560,7 @@ exports.validateBandwidthProfile = validateBandwidthProfile;
|
|
|
25097
25560
|
exports.validateLocalTrack = validateLocalTrack;
|
|
25098
25561
|
exports.validateObject = validateObject;
|
|
25099
25562
|
|
|
25100
|
-
},{"./":
|
|
25563
|
+
},{"./":131,"./constants":125}],150:[function(require,module,exports){
|
|
25101
25564
|
/**
|
|
25102
25565
|
* Copyright (c) 2011-2022 Isaac Z. Schlueter
|
|
25103
25566
|
* Licensed under the ISC License.
|
|
@@ -25132,7 +25595,7 @@ module.exports = function inherits(ctor, superCtor) {
|
|
|
25132
25595
|
}
|
|
25133
25596
|
};
|
|
25134
25597
|
|
|
25135
|
-
},{}],
|
|
25598
|
+
},{}],151:[function(require,module,exports){
|
|
25136
25599
|
/**
|
|
25137
25600
|
* Copyright (c) 2013 Tim Perry
|
|
25138
25601
|
* Licensed under the MIT license.
|
|
@@ -25372,7 +25835,7 @@ defaultLogger.getLoggers = function getLoggers() {
|
|
|
25372
25835
|
defaultLogger['default'] = defaultLogger;
|
|
25373
25836
|
module.exports = defaultLogger;
|
|
25374
25837
|
|
|
25375
|
-
},{}],
|
|
25838
|
+
},{}],152:[function(require,module,exports){
|
|
25376
25839
|
/* globals webkitAudioContext, AudioContext */
|
|
25377
25840
|
'use strict';
|
|
25378
25841
|
var NativeAudioContext = typeof AudioContext !== 'undefined'
|
|
@@ -25455,7 +25918,7 @@ var AudioContextFactory = /** @class */ (function () {
|
|
|
25455
25918
|
}());
|
|
25456
25919
|
module.exports = new AudioContextFactory();
|
|
25457
25920
|
|
|
25458
|
-
},{}],
|
|
25921
|
+
},{}],153:[function(require,module,exports){
|
|
25459
25922
|
'use strict';
|
|
25460
25923
|
/**
|
|
25461
25924
|
* Return a Promise that resolves after `timeout` milliseconds.
|
|
@@ -25508,7 +25971,7 @@ function detectSilence(audioContext, stream, timeout) {
|
|
|
25508
25971
|
}
|
|
25509
25972
|
module.exports = detectSilence;
|
|
25510
25973
|
|
|
25511
|
-
},{}],
|
|
25974
|
+
},{}],154:[function(require,module,exports){
|
|
25512
25975
|
'use strict';
|
|
25513
25976
|
var detectSilence = require('./detectsilence');
|
|
25514
25977
|
/**
|
|
@@ -25578,7 +26041,7 @@ to get a new one, but we\'ve run out of retries; returning it anyway.');
|
|
|
25578
26041
|
}
|
|
25579
26042
|
module.exports = workaround;
|
|
25580
26043
|
|
|
25581
|
-
},{"./audiocontext":
|
|
26044
|
+
},{"./audiocontext":152,"./detectsilence":153}],155:[function(require,module,exports){
|
|
25582
26045
|
'use strict';
|
|
25583
26046
|
var flatMap = require('./util').flatMap;
|
|
25584
26047
|
var guessBrowser = require('./util').guessBrowser;
|
|
@@ -26372,7 +26835,7 @@ function standardizeFirefoxStats(response, isRemote) {
|
|
|
26372
26835
|
*/
|
|
26373
26836
|
module.exports = getStats;
|
|
26374
26837
|
|
|
26375
|
-
},{"./util":
|
|
26838
|
+
},{"./util":170,"./util/sdp":172}],156:[function(require,module,exports){
|
|
26376
26839
|
/* globals navigator */
|
|
26377
26840
|
'use strict';
|
|
26378
26841
|
/**
|
|
@@ -26396,7 +26859,7 @@ function getUserMedia(constraints) {
|
|
|
26396
26859
|
}
|
|
26397
26860
|
module.exports = getUserMedia;
|
|
26398
26861
|
|
|
26399
|
-
},{}],
|
|
26862
|
+
},{}],157:[function(require,module,exports){
|
|
26400
26863
|
'use strict';
|
|
26401
26864
|
var WebRTC = {};
|
|
26402
26865
|
Object.defineProperties(WebRTC, {
|
|
@@ -26431,7 +26894,7 @@ Object.defineProperties(WebRTC, {
|
|
|
26431
26894
|
});
|
|
26432
26895
|
module.exports = WebRTC;
|
|
26433
26896
|
|
|
26434
|
-
},{"./getstats":
|
|
26897
|
+
},{"./getstats":155,"./getusermedia":156,"./mediastream":158,"./mediastreamtrack":159,"./rtcicecandidate":160,"./rtcpeerconnection":163,"./rtcsessiondescription":168}],158:[function(require,module,exports){
|
|
26435
26898
|
/* globals MediaStream */
|
|
26436
26899
|
'use strict';
|
|
26437
26900
|
if (typeof MediaStream === 'function') {
|
|
@@ -26443,7 +26906,7 @@ else {
|
|
|
26443
26906
|
};
|
|
26444
26907
|
}
|
|
26445
26908
|
|
|
26446
|
-
},{}],
|
|
26909
|
+
},{}],159:[function(require,module,exports){
|
|
26447
26910
|
/* global MediaStreamTrack */
|
|
26448
26911
|
'use strict';
|
|
26449
26912
|
if (typeof MediaStreamTrack === 'function') {
|
|
@@ -26455,7 +26918,7 @@ else {
|
|
|
26455
26918
|
};
|
|
26456
26919
|
}
|
|
26457
26920
|
|
|
26458
|
-
},{}],
|
|
26921
|
+
},{}],160:[function(require,module,exports){
|
|
26459
26922
|
/* global RTCIceCandidate */
|
|
26460
26923
|
'use strict';
|
|
26461
26924
|
if (typeof RTCIceCandidate === 'function') {
|
|
@@ -26467,7 +26930,7 @@ else {
|
|
|
26467
26930
|
};
|
|
26468
26931
|
}
|
|
26469
26932
|
|
|
26470
|
-
},{}],
|
|
26933
|
+
},{}],161:[function(require,module,exports){
|
|
26471
26934
|
/* globals RTCDataChannel, RTCPeerConnection, RTCSessionDescription */
|
|
26472
26935
|
'use strict';
|
|
26473
26936
|
var ChromeRTCSessionDescription = require('../rtcsessiondescription/chrome');
|
|
@@ -26978,7 +27441,7 @@ function updateTrackIdsToSSRCs(sdpFormat, tracksToSSRCs, sdp) {
|
|
|
26978
27441
|
}
|
|
26979
27442
|
module.exports = ChromeRTCPeerConnection;
|
|
26980
27443
|
|
|
26981
|
-
},{"../../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){
|
|
26982
27445
|
/* globals RTCPeerConnection */
|
|
26983
27446
|
'use strict';
|
|
26984
27447
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27273,7 +27736,7 @@ function overwriteWithInitiallyNegotiatedDtlsRole(description, dtlsRole) {
|
|
|
27273
27736
|
}
|
|
27274
27737
|
module.exports = FirefoxRTCPeerConnection;
|
|
27275
27738
|
|
|
27276
|
-
},{"../../vendor/inherits":
|
|
27739
|
+
},{"../../vendor/inherits":150,"../rtcsessiondescription/firefox":167,"../util":170,"../util/eventtarget":169,"../util/sdp":172}],163:[function(require,module,exports){
|
|
27277
27740
|
'use strict';
|
|
27278
27741
|
if (typeof RTCPeerConnection === 'function') {
|
|
27279
27742
|
var guessBrowser = require('../util').guessBrowser;
|
|
@@ -27298,7 +27761,7 @@ else {
|
|
|
27298
27761
|
};
|
|
27299
27762
|
}
|
|
27300
27763
|
|
|
27301
|
-
},{"../util":
|
|
27764
|
+
},{"../util":170,"./chrome":161,"./firefox":162,"./safari":164}],164:[function(require,module,exports){
|
|
27302
27765
|
/* globals RTCPeerConnection, RTCSessionDescription */
|
|
27303
27766
|
'use strict';
|
|
27304
27767
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27647,7 +28110,7 @@ function shimDataChannel(dataChannel) {
|
|
|
27647
28110
|
}
|
|
27648
28111
|
module.exports = SafariRTCPeerConnection;
|
|
27649
28112
|
|
|
27650
|
-
},{"../../vendor/inherits":
|
|
28113
|
+
},{"../../vendor/inherits":150,"../util":170,"../util/eventtarget":169,"../util/latch":171,"../util/sdp":172}],165:[function(require,module,exports){
|
|
27651
28114
|
'use strict';
|
|
27652
28115
|
/**
|
|
27653
28116
|
* RTCRtpSender shim.
|
|
@@ -27685,7 +28148,7 @@ function RTCRtpSenderShim(track) {
|
|
|
27685
28148
|
// using the RTCRtpSender APIs.
|
|
27686
28149
|
module.exports = RTCRtpSenderShim;
|
|
27687
28150
|
|
|
27688
|
-
},{}],
|
|
28151
|
+
},{}],166:[function(require,module,exports){
|
|
27689
28152
|
/* globals RTCSessionDescription */
|
|
27690
28153
|
'use strict';
|
|
27691
28154
|
// This class wraps Chrome's RTCSessionDescription implementation. It provides
|
|
@@ -27722,12 +28185,12 @@ function ChromeRTCSessionDescription(descriptionInitDict) {
|
|
|
27722
28185
|
}
|
|
27723
28186
|
module.exports = ChromeRTCSessionDescription;
|
|
27724
28187
|
|
|
27725
|
-
},{}],
|
|
28188
|
+
},{}],167:[function(require,module,exports){
|
|
27726
28189
|
/* globals RTCSessionDescription */
|
|
27727
28190
|
'use strict';
|
|
27728
28191
|
module.exports = RTCSessionDescription;
|
|
27729
28192
|
|
|
27730
|
-
},{}],
|
|
28193
|
+
},{}],168:[function(require,module,exports){
|
|
27731
28194
|
/* globals RTCSessionDescription */
|
|
27732
28195
|
'use strict';
|
|
27733
28196
|
if (typeof RTCSessionDescription === 'function') {
|
|
@@ -27750,7 +28213,7 @@ else {
|
|
|
27750
28213
|
};
|
|
27751
28214
|
}
|
|
27752
28215
|
|
|
27753
|
-
},{"../util":
|
|
28216
|
+
},{"../util":170,"./chrome":166,"./firefox":167}],169:[function(require,module,exports){
|
|
27754
28217
|
'use strict';
|
|
27755
28218
|
var EventEmitter = require('events').EventEmitter;
|
|
27756
28219
|
/**
|
|
@@ -27785,7 +28248,7 @@ EventTarget.prototype.removeEventListener = function removeEventListener() {
|
|
|
27785
28248
|
};
|
|
27786
28249
|
module.exports = EventTarget;
|
|
27787
28250
|
|
|
27788
|
-
},{"events":
|
|
28251
|
+
},{"events":173}],170:[function(require,module,exports){
|
|
27789
28252
|
'use strict';
|
|
27790
28253
|
/**
|
|
27791
28254
|
* Create a {@link Deferred}.
|
|
@@ -28094,7 +28557,7 @@ exports.makeUUID = makeUUID;
|
|
|
28094
28557
|
exports.proxyProperties = proxyProperties;
|
|
28095
28558
|
exports.support = support;
|
|
28096
28559
|
|
|
28097
|
-
},{}],
|
|
28560
|
+
},{}],171:[function(require,module,exports){
|
|
28098
28561
|
'use strict';
|
|
28099
28562
|
var defer = require('./').defer;
|
|
28100
28563
|
var states = {
|
|
@@ -28200,7 +28663,7 @@ function createUnreachableStateError(from, to) {
|
|
|
28200
28663
|
}
|
|
28201
28664
|
module.exports = Latch;
|
|
28202
28665
|
|
|
28203
|
-
},{"./":
|
|
28666
|
+
},{"./":170}],172:[function(require,module,exports){
|
|
28204
28667
|
/* globals RTCPeerConnection, RTCRtpTransceiver */
|
|
28205
28668
|
'use strict';
|
|
28206
28669
|
var flatMap = require('./').flatMap;
|
|
@@ -28494,7 +28957,7 @@ exports.getUnifiedPlanSSRCs = getUnifiedPlanSSRCs;
|
|
|
28494
28957
|
exports.updatePlanBTrackIdsToSSRCs = updatePlanBTrackIdsToSSRCs;
|
|
28495
28958
|
exports.updateUnifiedPlanTrackIdsToSSRCs = updateUnifiedPlanTrackIdsToSSRCs;
|
|
28496
28959
|
|
|
28497
|
-
},{"./":
|
|
28960
|
+
},{"./":170}],173:[function(require,module,exports){
|
|
28498
28961
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
28499
28962
|
//
|
|
28500
28963
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -28993,12 +29456,12 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
|
28993
29456
|
}
|
|
28994
29457
|
}
|
|
28995
29458
|
|
|
28996
|
-
},{}],
|
|
29459
|
+
},{}],174:[function(require,module,exports){
|
|
28997
29460
|
module.exports={
|
|
28998
29461
|
"name": "twilio-video",
|
|
28999
29462
|
"title": "Twilio Video",
|
|
29000
29463
|
"description": "Twilio Video JavaScript Library",
|
|
29001
|
-
"version": "2.
|
|
29464
|
+
"version": "2.23.0",
|
|
29002
29465
|
"homepage": "https://twilio.com",
|
|
29003
29466
|
"author": "Mark Andrus Roberts <mroberts@twilio.com>",
|
|
29004
29467
|
"contributors": [
|
|
@@ -29131,7 +29594,7 @@ module.exports={
|
|
|
29131
29594
|
"test:framework:install": "npm install chromedriver && npm install selenium-webdriver && npm install geckodriver && npm install puppeteer",
|
|
29132
29595
|
"test:framework": "npm-run-all test:framework:install test:framework:no-framework test:framework:react",
|
|
29133
29596
|
"test": "npm-run-all test:unit test:integration",
|
|
29134
|
-
"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",
|
|
29135
29598
|
"build:js": "node ./scripts/build.js ./src/twilio-video.js ./LICENSE.md ./dist/twilio-video.js",
|
|
29136
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",
|
|
29137
29600
|
"build": "npm-run-all clean lint docs test:unit test:integration build:es5 build:js build:min.js test:umd",
|
|
@@ -29152,12 +29615,12 @@ module.exports={
|
|
|
29152
29615
|
}
|
|
29153
29616
|
}
|
|
29154
29617
|
|
|
29155
|
-
},{}],
|
|
29618
|
+
},{}],175:[function(require,module,exports){
|
|
29156
29619
|
module.exports = WebSocket;
|
|
29157
29620
|
|
|
29158
|
-
},{}]},{},[
|
|
29621
|
+
},{}]},{},[12]);
|
|
29159
29622
|
;
|
|
29160
|
-
var Video = bundle(
|
|
29623
|
+
var Video = bundle(12);
|
|
29161
29624
|
/* globals define */
|
|
29162
29625
|
if (typeof define === 'function' && define.amd) {
|
|
29163
29626
|
define([], function() { return Video; });
|