twilio-video 2.22.2 → 2.24.1
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 +72 -1
- package/README.md +1 -1
- package/dist/twilio-video.js +767 -204
- 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/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 +30 -1
- package/es5/media/track/localaudiotrack.js.map +1 -1
- package/es5/media/track/localvideotrack.js +1 -1
- package/es5/media/track/localvideotrack.js.map +1 -1
- package/es5/media/track/noisecancellationimpl.js +228 -0
- package/es5/media/track/noisecancellationimpl.js.map +1 -0
- package/es5/noisecancellationadapter.js +155 -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/es5/vendor/dynamicimport.js +44 -0
- package/es5/vendor/dynamicimport.js.map +1 -0
- 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/index.ts +5 -3
- package/lib/localparticipant.js +10 -1
- package/lib/media/track/localaudiotrack.js +30 -0
- package/lib/media/track/localvideotrack.js +1 -1
- package/lib/media/track/noisecancellationimpl.ts +176 -0
- package/lib/noisecancellationadapter.ts +134 -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/lib/vendor/dynamicimport.js +44 -0
- package/package.json +2 -2
- package/tsconfig.json +1 -0
- package/tsdef/AudioProcessor.d.ts +65 -0
- package/tsdef/LocalAudioTrack.d.ts +2 -0
- package/tsdef/LocalTrackOptions.d.ts +1 -1
- 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.24.1
|
|
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":123}],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":9,"./localparticipant":12,"./media/track/es5":14,"./networkqualityconfiguration":
|
|
1002
|
+
},{"./cancelableroompromise":1,"./encodingparameters":9,"./localparticipant":12,"./media/track/es5":14,"./networkqualityconfiguration":43,"./room":56,"./signaling/v2":70,"./util":130,"./util/cancelablepromise":123,"./util/constants":124,"./util/eventobserver":128,"./util/insightspublisher":131,"./util/insightspublisher/null":132,"./util/log":134,"./util/validate":148,"./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":124}],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":14,"./util":
|
|
1389
|
+
},{"./media/track/es5":14,"./media/track/noisecancellationimpl":28,"./util":130,"./util/constants":124,"./util/log":134,"./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":130,"./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":118}],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,7 @@ var DataTransport = /** @class */ (function (_super) {
|
|
|
1687
1742
|
*/
|
|
1688
1743
|
module.exports = DataTransport;
|
|
1689
1744
|
|
|
1690
|
-
},{"events":
|
|
1745
|
+
},{"events":173}],9:[function(require,module,exports){
|
|
1691
1746
|
'use strict';
|
|
1692
1747
|
var __extends = (this && this.__extends) || (function () {
|
|
1693
1748
|
var extendStatics = function (d, b) {
|
|
@@ -1785,13 +1840,13 @@ var EncodingParametersImpl = /** @class */ (function (_super) {
|
|
|
1785
1840
|
*/
|
|
1786
1841
|
module.exports = EncodingParametersImpl;
|
|
1787
1842
|
|
|
1788
|
-
},{"events":
|
|
1843
|
+
},{"events":173}],10:[function(require,module,exports){
|
|
1789
1844
|
'use strict';
|
|
1790
1845
|
var EventEmitter = require('events').EventEmitter;
|
|
1791
1846
|
var hidePrivateAndCertainPublicPropertiesInClass = require('./util').hidePrivateAndCertainPublicPropertiesInClass;
|
|
1792
1847
|
module.exports = hidePrivateAndCertainPublicPropertiesInClass(EventEmitter, ['domain']);
|
|
1793
1848
|
|
|
1794
|
-
},{"./util":
|
|
1849
|
+
},{"./util":130,"events":173}],11:[function(require,module,exports){
|
|
1795
1850
|
'use strict';
|
|
1796
1851
|
var __assign = (this && this.__assign) || function () {
|
|
1797
1852
|
__assign = Object.assign || function(t) {
|
|
@@ -1862,10 +1917,10 @@ module.exports = {
|
|
|
1862
1917
|
Logger: Logger,
|
|
1863
1918
|
LocalAudioTrack: LocalAudioTrack,
|
|
1864
1919
|
LocalVideoTrack: LocalVideoTrack,
|
|
1865
|
-
LocalDataTrack: LocalDataTrack
|
|
1920
|
+
LocalDataTrack: LocalDataTrack,
|
|
1866
1921
|
};
|
|
1867
1922
|
|
|
1868
|
-
},{"../package.json":
|
|
1923
|
+
},{"../package.json":174,"./connect":2,"./createlocaltrack":3,"./createlocaltracks":4,"./media/track/es5":14,"./preflight/preflighttest":50,"./util/support":143,"./vendor/loglevel":151}],12:[function(require,module,exports){
|
|
1869
1924
|
'use strict';
|
|
1870
1925
|
var __extends = (this && this.__extends) || (function () {
|
|
1871
1926
|
var extendStatics = function (d, b) {
|
|
@@ -2002,7 +2057,10 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2002
2057
|
* @returns {void}
|
|
2003
2058
|
*/
|
|
2004
2059
|
LocalParticipant.prototype._addLocalTrack = function (track, priority) {
|
|
2005
|
-
|
|
2060
|
+
var _a;
|
|
2061
|
+
// check if track has noise cancellation enabled.
|
|
2062
|
+
var vendor = (_a = track.noiseCancellation) === null || _a === void 0 ? void 0 : _a.vendor;
|
|
2063
|
+
this._signaling.addTrack(track._trackSender, track.name, priority, vendor);
|
|
2006
2064
|
this._log.info("Added a new " + trackClass(track, true) + ":", track.id);
|
|
2007
2065
|
this._log.debug(trackClass(track, true) + ":", track);
|
|
2008
2066
|
};
|
|
@@ -2290,6 +2348,12 @@ var LocalParticipant = /** @class */ (function (_super) {
|
|
|
2290
2348
|
catch (error) {
|
|
2291
2349
|
return Promise.reject(error);
|
|
2292
2350
|
}
|
|
2351
|
+
var noiseCancellation = localTrack.noiseCancellation;
|
|
2352
|
+
var allowedAudioProcessors = this._signaling.audioProcessors;
|
|
2353
|
+
if (noiseCancellation && !allowedAudioProcessors.includes(noiseCancellation.vendor)) {
|
|
2354
|
+
this._log.warn(noiseCancellation.vendor + " is not supported in this room. disabling it permanently");
|
|
2355
|
+
noiseCancellation.disablePermanently();
|
|
2356
|
+
}
|
|
2293
2357
|
var priorityValues = Object.values(trackPriority);
|
|
2294
2358
|
if (!priorityValues.includes(options.priority)) {
|
|
2295
2359
|
// eslint-disable-next-line new-cap
|
|
@@ -2568,7 +2632,7 @@ function getTrackPublication(trackPublications, track) {
|
|
|
2568
2632
|
}
|
|
2569
2633
|
module.exports = LocalParticipant;
|
|
2570
2634
|
|
|
2571
|
-
},{"./media/track/es5":14,"./media/track/localaudiotrackpublication":20,"./media/track/localdatatrackpublication":22,"./media/track/localvideotrackpublication":26,"./participant":
|
|
2635
|
+
},{"./media/track/es5":14,"./media/track/localaudiotrackpublication":20,"./media/track/localdatatrackpublication":22,"./media/track/localvideotrackpublication":26,"./participant":45,"./util":130,"./util/constants":124,"./util/validate":148,"./webrtc":157}],13:[function(require,module,exports){
|
|
2572
2636
|
'use strict';
|
|
2573
2637
|
var __extends = (this && this.__extends) || (function () {
|
|
2574
2638
|
var extendStatics = function (d, b) {
|
|
@@ -2757,7 +2821,7 @@ function LocalAudioTrack(mediaStreamTrack, options) {
|
|
|
2757
2821
|
inherits(LocalAudioTrack, LocalAudioTrackClass);
|
|
2758
2822
|
module.exports = LocalAudioTrack;
|
|
2759
2823
|
|
|
2760
|
-
},{"../../../vendor/inherits":
|
|
2824
|
+
},{"../../../vendor/inherits":150,"../localaudiotrack":19}],16:[function(require,module,exports){
|
|
2761
2825
|
// eslint-disable-next-line no-warning-comments
|
|
2762
2826
|
// TODO(mroberts): Remove this when we go to the next major version. This is
|
|
2763
2827
|
// only in place so that we can support ES6 classes without requiring `new`.
|
|
@@ -2772,7 +2836,7 @@ function LocalDataTrack(options) {
|
|
|
2772
2836
|
inherits(LocalDataTrack, LocalDataTrackClass);
|
|
2773
2837
|
module.exports = LocalDataTrack;
|
|
2774
2838
|
|
|
2775
|
-
},{"../../../vendor/inherits":
|
|
2839
|
+
},{"../../../vendor/inherits":150,"../localdatatrack":21}],17:[function(require,module,exports){
|
|
2776
2840
|
// eslint-disable-next-line no-warning-comments
|
|
2777
2841
|
// TODO(mroberts): Remove this when we go to the next major version. This is
|
|
2778
2842
|
// only in place so that we can support ES6 classes without requiring `new`.
|
|
@@ -2787,7 +2851,7 @@ function LocalVideoTrack(mediaStreamTrack, options) {
|
|
|
2787
2851
|
inherits(LocalVideoTrack, LocalVideoTrackClass);
|
|
2788
2852
|
module.exports = LocalVideoTrack;
|
|
2789
2853
|
|
|
2790
|
-
},{"../../../vendor/inherits":
|
|
2854
|
+
},{"../../../vendor/inherits":150,"../localvideotrack":25}],18:[function(require,module,exports){
|
|
2791
2855
|
'use strict';
|
|
2792
2856
|
var __extends = (this && this.__extends) || (function () {
|
|
2793
2857
|
var extendStatics = function (d, b) {
|
|
@@ -2899,7 +2963,7 @@ var Track = /** @class */ (function (_super) {
|
|
|
2899
2963
|
*/
|
|
2900
2964
|
module.exports = Track;
|
|
2901
2965
|
|
|
2902
|
-
},{"../../eventemitter":10,"../../util":
|
|
2966
|
+
},{"../../eventemitter":10,"../../util":130,"../../util/constants":124,"../../util/log":134}],19:[function(require,module,exports){
|
|
2903
2967
|
'use strict';
|
|
2904
2968
|
var __extends = (this && this.__extends) || (function () {
|
|
2905
2969
|
var extendStatics = function (d, b) {
|
|
@@ -2929,6 +2993,9 @@ var LocalMediaAudioTrack = mixinLocalMediaTrack(AudioTrack);
|
|
|
2929
2993
|
* @property {Track.ID} id - The {@link LocalAudioTrack}'s ID
|
|
2930
2994
|
* @property {boolean} isStopped - Whether or not the {@link LocalAudioTrack} is
|
|
2931
2995
|
* stopped
|
|
2996
|
+
* @property {NoiseCancellation?} noiseCancellation - When a LocalAudioTrack is created
|
|
2997
|
+
* with {@link NoiseCancellationOptions}, this property provides interface
|
|
2998
|
+
* to enable or disable the noise cancellation at runtime.
|
|
2932
2999
|
* @emits LocalAudioTrack#disabled
|
|
2933
3000
|
* @emits LocalAudioTrack#enabled
|
|
2934
3001
|
* @emits LocalAudioTrack#started
|
|
@@ -2942,7 +3009,17 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
2942
3009
|
* @param {LocalTrackOptions} [options] - {@link LocalTrack} options
|
|
2943
3010
|
*/
|
|
2944
3011
|
function LocalAudioTrack(mediaStreamTrack, options) {
|
|
2945
|
-
|
|
3012
|
+
var _this = this;
|
|
3013
|
+
var noiseCancellation = (options === null || options === void 0 ? void 0 : options.noiseCancellation) || null;
|
|
3014
|
+
_this = _super.call(this, mediaStreamTrack, options) || this;
|
|
3015
|
+
Object.defineProperties(_this, {
|
|
3016
|
+
noiseCancellation: {
|
|
3017
|
+
enumerable: true,
|
|
3018
|
+
value: noiseCancellation,
|
|
3019
|
+
writable: false
|
|
3020
|
+
},
|
|
3021
|
+
});
|
|
3022
|
+
return _this;
|
|
2946
3023
|
}
|
|
2947
3024
|
LocalAudioTrack.prototype.toString = function () {
|
|
2948
3025
|
return "[LocalAudioTrack #" + this._instanceId + ": " + this.id + "]";
|
|
@@ -2958,6 +3035,19 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
2958
3035
|
LocalAudioTrack.prototype._end = function () {
|
|
2959
3036
|
return _super.prototype._end.apply(this, arguments);
|
|
2960
3037
|
};
|
|
3038
|
+
/**
|
|
3039
|
+
* @private
|
|
3040
|
+
*/
|
|
3041
|
+
LocalAudioTrack.prototype._reacquireTrack = function (constraints) {
|
|
3042
|
+
var _this = this;
|
|
3043
|
+
this._log.debug('_reacquireTrack: ', constraints);
|
|
3044
|
+
if (this.noiseCancellation) {
|
|
3045
|
+
return this.noiseCancellation.reacquireTrack(function () {
|
|
3046
|
+
return _super.prototype._reacquireTrack.call(_this, constraints);
|
|
3047
|
+
});
|
|
3048
|
+
}
|
|
3049
|
+
return _super.prototype._reacquireTrack.call(this, constraints);
|
|
3050
|
+
};
|
|
2961
3051
|
/**
|
|
2962
3052
|
* Disable the {@link LocalAudioTrack}. This is effectively "mute".
|
|
2963
3053
|
* @returns {this}
|
|
@@ -3026,6 +3116,9 @@ var LocalAudioTrack = /** @class */ (function (_super) {
|
|
|
3026
3116
|
* @fires LocalAudioTrack#stopped
|
|
3027
3117
|
*/
|
|
3028
3118
|
LocalAudioTrack.prototype.stop = function () {
|
|
3119
|
+
if (this.noiseCancellation) {
|
|
3120
|
+
this.noiseCancellation.stop();
|
|
3121
|
+
}
|
|
3029
3122
|
return _super.prototype.stop.apply(this, arguments);
|
|
3030
3123
|
};
|
|
3031
3124
|
return LocalAudioTrack;
|
|
@@ -3644,7 +3737,7 @@ function restartWhenInadvertentlyStopped(localMediaTrack) {
|
|
|
3644
3737
|
}
|
|
3645
3738
|
module.exports = mixinLocalMediaTrack;
|
|
3646
3739
|
|
|
3647
|
-
},{"../../util":
|
|
3740
|
+
},{"../../util":130,"../../util/constants":124,"../../util/detectsilentaudio":125,"../../util/detectsilentvideo":126,"../../util/documentvisibilitymonitor.js":127,"../../util/localmediarestartdeferreds":133,"../../webaudio/workaround180748":154,"../../webrtc":157,"../../webrtc/util":170,"./sender":38}],24:[function(require,module,exports){
|
|
3648
3741
|
/* eslint new-cap:0 */
|
|
3649
3742
|
'use strict';
|
|
3650
3743
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -3810,7 +3903,7 @@ var LocalTrackPublication = /** @class */ (function (_super) {
|
|
|
3810
3903
|
*/
|
|
3811
3904
|
module.exports = LocalTrackPublication;
|
|
3812
3905
|
|
|
3813
|
-
},{"../../util/constants":
|
|
3906
|
+
},{"../../util/constants":124,"./trackpublication":39}],25:[function(require,module,exports){
|
|
3814
3907
|
'use strict';
|
|
3815
3908
|
var __extends = (this && this.__extends) || (function () {
|
|
3816
3909
|
var extendStatics = function (d, b) {
|
|
@@ -4116,7 +4209,7 @@ function workaroundSilentLocalVideo(localVideoTrack, doc) {
|
|
|
4116
4209
|
}).finally(function () {
|
|
4117
4210
|
// If silent frames were not detected, then pause the dummy element again.
|
|
4118
4211
|
el = localVideoTrack._dummyEl;
|
|
4119
|
-
if (!el.paused) {
|
|
4212
|
+
if (el && !el.paused) {
|
|
4120
4213
|
el.pause();
|
|
4121
4214
|
}
|
|
4122
4215
|
// Reset the unmute handler.
|
|
@@ -4157,7 +4250,7 @@ function workaroundSilentLocalVideo(localVideoTrack, doc) {
|
|
|
4157
4250
|
*/
|
|
4158
4251
|
module.exports = LocalVideoTrack;
|
|
4159
4252
|
|
|
4160
|
-
},{"../../util":
|
|
4253
|
+
},{"../../util":130,"../../util/detectsilentvideo":126,"../../webrtc/util":170,"./localmediatrack":23,"./videotrack":42}],26:[function(require,module,exports){
|
|
4161
4254
|
'use strict';
|
|
4162
4255
|
var __extends = (this && this.__extends) || (function () {
|
|
4163
4256
|
var extendStatics = function (d, b) {
|
|
@@ -4567,7 +4660,236 @@ function shimMediaElement(el, onUnintentionallyPaused) {
|
|
|
4567
4660
|
}
|
|
4568
4661
|
module.exports = MediaTrack;
|
|
4569
4662
|
|
|
4570
|
-
},{"../../util":
|
|
4663
|
+
},{"../../util":130,"../../util/localmediarestartdeferreds":133,"../../webrtc":157,"../../webrtc/util":170,"./":18}],28:[function(require,module,exports){
|
|
4664
|
+
'use strict';
|
|
4665
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4666
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4667
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4668
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
4669
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
4670
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
4671
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
4672
|
+
});
|
|
4673
|
+
};
|
|
4674
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
4675
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
4676
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
4677
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
4678
|
+
function step(op) {
|
|
4679
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
4680
|
+
while (_) try {
|
|
4681
|
+
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;
|
|
4682
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
4683
|
+
switch (op[0]) {
|
|
4684
|
+
case 0: case 1: t = op; break;
|
|
4685
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
4686
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
4687
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
4688
|
+
default:
|
|
4689
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
4690
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
4691
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
4692
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
4693
|
+
if (t[2]) _.ops.pop();
|
|
4694
|
+
_.trys.pop(); continue;
|
|
4695
|
+
}
|
|
4696
|
+
op = body.call(thisArg, _);
|
|
4697
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
4698
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
4699
|
+
}
|
|
4700
|
+
};
|
|
4701
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4702
|
+
exports.applyNoiseCancellation = exports.NoiseCancellationImpl = void 0;
|
|
4703
|
+
var noisecancellationadapter_1 = require("../../noisecancellationadapter");
|
|
4704
|
+
var Log = require('../../util/log');
|
|
4705
|
+
/**
|
|
4706
|
+
* {@link NoiseCancellation} interface provides methods to control noise cancellation at runtime. This interface is exposed
|
|
4707
|
+
* on {@link LocalAudioTrack} property `noiseCancellation`. It is available only when {@link NoiseCancellationOptions} are
|
|
4708
|
+
* specified when creating a {@link LocalAudioTrack}, and the plugin is successfully loaded.
|
|
4709
|
+
* @alias NoiseCancellation
|
|
4710
|
+
* @interface
|
|
4711
|
+
*
|
|
4712
|
+
* @example
|
|
4713
|
+
* const { connect, createLocalAudioTrack } = require('twilio-video');
|
|
4714
|
+
*
|
|
4715
|
+
* // Create a LocalAudioTrack with Krisp noise cancellation enabled.
|
|
4716
|
+
* const localAudioTrack = await createLocalAudioTrack({
|
|
4717
|
+
* noiseCancellationOptions: {
|
|
4718
|
+
* sdkAssetsPath: 'path/to/hosted/twilio/krisp/audio/plugin/1.0.0/dist',
|
|
4719
|
+
* vendor: 'krisp'
|
|
4720
|
+
* }
|
|
4721
|
+
* });
|
|
4722
|
+
*
|
|
4723
|
+
* if (!localAudioTrack.noiseCancellation) {
|
|
4724
|
+
* // If the Krisp audio plugin fails to load, then a warning message will be logged
|
|
4725
|
+
* // in the browser console, and the "noiseCancellation" property will be set to null.
|
|
4726
|
+
* // You can still use the LocalAudioTrack to join a Room. However, it will use the
|
|
4727
|
+
* // browser's noise suppression instead of the Krisp noise cancellation. Make sure
|
|
4728
|
+
* // the "sdkAssetsPath" provided in "noiseCancellationOptions" points to the correct
|
|
4729
|
+
* // hosted path of the plugin assets.
|
|
4730
|
+
* } else {
|
|
4731
|
+
* // Join a Room with the LocalAudioTrack.
|
|
4732
|
+
* const room = await connect('token', {
|
|
4733
|
+
* name: 'my-cool-room',
|
|
4734
|
+
* tracks: [localAudioTrack]
|
|
4735
|
+
* });
|
|
4736
|
+
*
|
|
4737
|
+
* if (!localAudioTrack.noiseCancellation.isEnabled) {
|
|
4738
|
+
* // Krisp noise cancellation is permanently disabled in Peer-to-Peer and Go Rooms.
|
|
4739
|
+
* }
|
|
4740
|
+
* }
|
|
4741
|
+
*
|
|
4742
|
+
* //
|
|
4743
|
+
* // Enable/disable noise cancellation.
|
|
4744
|
+
* // @param {boolean} enable - whether noise cancellation should be enabled
|
|
4745
|
+
* //
|
|
4746
|
+
* function setNoiseCancellation(enable) {
|
|
4747
|
+
* const { noiseCancellation } = localAudioTrack;
|
|
4748
|
+
* if (noiseCancellation) {
|
|
4749
|
+
* if (enable) {
|
|
4750
|
+
* // If enabled, then the LocalAudioTrack will use the Krisp noise
|
|
4751
|
+
* // cancellation instead of the browser's noise suppression.
|
|
4752
|
+
* noiseCancellation.enable();
|
|
4753
|
+
* } else {
|
|
4754
|
+
* // If disabled, then the LocalAudioTrack will use the browser's
|
|
4755
|
+
* // noise suppression instead of the Krisp noise cancellation.
|
|
4756
|
+
* noiseCancellation.disable();
|
|
4757
|
+
* }
|
|
4758
|
+
* }
|
|
4759
|
+
* }
|
|
4760
|
+
*/
|
|
4761
|
+
var NoiseCancellationImpl = /** @class */ (function () {
|
|
4762
|
+
function NoiseCancellationImpl(processor, originalTrack) {
|
|
4763
|
+
this._processor = processor;
|
|
4764
|
+
this._sourceTrack = originalTrack;
|
|
4765
|
+
this._disabledPermanent = false;
|
|
4766
|
+
}
|
|
4767
|
+
Object.defineProperty(NoiseCancellationImpl.prototype, "vendor", {
|
|
4768
|
+
/**
|
|
4769
|
+
* Name of the noise cancellation vendor.
|
|
4770
|
+
* @type {NoiseCancellationVendor}
|
|
4771
|
+
*/
|
|
4772
|
+
get: function () {
|
|
4773
|
+
return this._processor.vendor;
|
|
4774
|
+
},
|
|
4775
|
+
enumerable: false,
|
|
4776
|
+
configurable: true
|
|
4777
|
+
});
|
|
4778
|
+
Object.defineProperty(NoiseCancellationImpl.prototype, "sourceTrack", {
|
|
4779
|
+
/**
|
|
4780
|
+
* The underlying MediaStreamTrack of the {@link LocalAudioTrack}.
|
|
4781
|
+
* @type {MediaStreamTrack}
|
|
4782
|
+
*/
|
|
4783
|
+
get: function () {
|
|
4784
|
+
return this._sourceTrack;
|
|
4785
|
+
},
|
|
4786
|
+
enumerable: false,
|
|
4787
|
+
configurable: true
|
|
4788
|
+
});
|
|
4789
|
+
Object.defineProperty(NoiseCancellationImpl.prototype, "isEnabled", {
|
|
4790
|
+
/**
|
|
4791
|
+
* Whether noise cancellation is enabled.
|
|
4792
|
+
* @type {boolean}
|
|
4793
|
+
*/
|
|
4794
|
+
get: function () {
|
|
4795
|
+
return this._processor.isEnabled();
|
|
4796
|
+
},
|
|
4797
|
+
enumerable: false,
|
|
4798
|
+
configurable: true
|
|
4799
|
+
});
|
|
4800
|
+
/**
|
|
4801
|
+
* Enable noise cancellation.
|
|
4802
|
+
* @returns {Promise<void>} Promise that resolves when the operation is complete
|
|
4803
|
+
* @throws {Error} Throws an error if noise cancellation is disabled permanently
|
|
4804
|
+
* for the {@link LocalAudioTrack}
|
|
4805
|
+
*/
|
|
4806
|
+
NoiseCancellationImpl.prototype.enable = function () {
|
|
4807
|
+
if (this._disabledPermanent) {
|
|
4808
|
+
throw new Error(this.vendor + " noise cancellation is disabled permanently for this track");
|
|
4809
|
+
}
|
|
4810
|
+
this._processor.enable();
|
|
4811
|
+
return Promise.resolve();
|
|
4812
|
+
};
|
|
4813
|
+
/**
|
|
4814
|
+
* Disable noise cancellation.
|
|
4815
|
+
* @returns {Promise<void>} Promise that resolves when the operation is complete
|
|
4816
|
+
*/
|
|
4817
|
+
NoiseCancellationImpl.prototype.disable = function () {
|
|
4818
|
+
this._processor.disable();
|
|
4819
|
+
return Promise.resolve();
|
|
4820
|
+
};
|
|
4821
|
+
/**
|
|
4822
|
+
* @private
|
|
4823
|
+
*/
|
|
4824
|
+
NoiseCancellationImpl.prototype.reacquireTrack = function (reacquire) {
|
|
4825
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4826
|
+
var processorWasEnabled, track, processedTrack;
|
|
4827
|
+
return __generator(this, function (_a) {
|
|
4828
|
+
switch (_a.label) {
|
|
4829
|
+
case 0:
|
|
4830
|
+
processorWasEnabled = this._processor.isEnabled();
|
|
4831
|
+
this._processor.disconnect();
|
|
4832
|
+
return [4 /*yield*/, reacquire()];
|
|
4833
|
+
case 1:
|
|
4834
|
+
track = _a.sent();
|
|
4835
|
+
this._sourceTrack = track;
|
|
4836
|
+
return [4 /*yield*/, this._processor.connect(track)];
|
|
4837
|
+
case 2:
|
|
4838
|
+
processedTrack = _a.sent();
|
|
4839
|
+
if (processorWasEnabled) {
|
|
4840
|
+
this._processor.enable();
|
|
4841
|
+
}
|
|
4842
|
+
else {
|
|
4843
|
+
this._processor.disable();
|
|
4844
|
+
}
|
|
4845
|
+
return [2 /*return*/, processedTrack];
|
|
4846
|
+
}
|
|
4847
|
+
});
|
|
4848
|
+
});
|
|
4849
|
+
};
|
|
4850
|
+
/**
|
|
4851
|
+
* @private
|
|
4852
|
+
*/
|
|
4853
|
+
NoiseCancellationImpl.prototype.disablePermanently = function () {
|
|
4854
|
+
this._disabledPermanent = true;
|
|
4855
|
+
return this.disable();
|
|
4856
|
+
};
|
|
4857
|
+
/**
|
|
4858
|
+
* @private
|
|
4859
|
+
*/
|
|
4860
|
+
NoiseCancellationImpl.prototype.stop = function () {
|
|
4861
|
+
this._processor.disconnect();
|
|
4862
|
+
this._sourceTrack.stop();
|
|
4863
|
+
};
|
|
4864
|
+
return NoiseCancellationImpl;
|
|
4865
|
+
}());
|
|
4866
|
+
exports.NoiseCancellationImpl = NoiseCancellationImpl;
|
|
4867
|
+
function applyNoiseCancellation(mediaStreamTrack, noiseCancellationOptions, log) {
|
|
4868
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4869
|
+
var processor, cleanTrack, noiseCancellation, ex_1;
|
|
4870
|
+
return __generator(this, function (_a) {
|
|
4871
|
+
switch (_a.label) {
|
|
4872
|
+
case 0:
|
|
4873
|
+
_a.trys.push([0, 2, , 3]);
|
|
4874
|
+
return [4 /*yield*/, noisecancellationadapter_1.createNoiseCancellationAudioProcessor(noiseCancellationOptions, log)];
|
|
4875
|
+
case 1:
|
|
4876
|
+
processor = _a.sent();
|
|
4877
|
+
cleanTrack = processor.connect(mediaStreamTrack);
|
|
4878
|
+
noiseCancellation = new NoiseCancellationImpl(processor, mediaStreamTrack);
|
|
4879
|
+
return [2 /*return*/, { cleanTrack: cleanTrack, noiseCancellation: noiseCancellation }];
|
|
4880
|
+
case 2:
|
|
4881
|
+
ex_1 = _a.sent();
|
|
4882
|
+
// in case of failures to load noise cancellation library just return original media stream.
|
|
4883
|
+
log.warn("Failed to create noise cancellation. Returning normal audio track: " + ex_1);
|
|
4884
|
+
return [2 /*return*/, { cleanTrack: mediaStreamTrack }];
|
|
4885
|
+
case 3: return [2 /*return*/];
|
|
4886
|
+
}
|
|
4887
|
+
});
|
|
4888
|
+
});
|
|
4889
|
+
}
|
|
4890
|
+
exports.applyNoiseCancellation = applyNoiseCancellation;
|
|
4891
|
+
|
|
4892
|
+
},{"../../noisecancellationadapter":44,"../../util/log":134}],29:[function(require,module,exports){
|
|
4571
4893
|
'use strict';
|
|
4572
4894
|
var __extends = (this && this.__extends) || (function () {
|
|
4573
4895
|
var extendStatics = function (d, b) {
|
|
@@ -4603,7 +4925,7 @@ var MediaTrackReceiver = /** @class */ (function (_super) {
|
|
|
4603
4925
|
}(MediaTrackTransceiver));
|
|
4604
4926
|
module.exports = MediaTrackReceiver;
|
|
4605
4927
|
|
|
4606
|
-
},{"./transceiver":
|
|
4928
|
+
},{"./transceiver":40}],30:[function(require,module,exports){
|
|
4607
4929
|
'use strict';
|
|
4608
4930
|
var __extends = (this && this.__extends) || (function () {
|
|
4609
4931
|
var extendStatics = function (d, b) {
|
|
@@ -4700,7 +5022,7 @@ var RemoteAudioTrack = /** @class */ (function (_super) {
|
|
|
4700
5022
|
*/
|
|
4701
5023
|
module.exports = RemoteAudioTrack;
|
|
4702
5024
|
|
|
4703
|
-
},{"./audiotrack":13,"./remotemediatrack":
|
|
5025
|
+
},{"./audiotrack":13,"./remotemediatrack":34}],31:[function(require,module,exports){
|
|
4704
5026
|
'use strict';
|
|
4705
5027
|
var __extends = (this && this.__extends) || (function () {
|
|
4706
5028
|
var extendStatics = function (d, b) {
|
|
@@ -4772,7 +5094,7 @@ var RemoteAudioTrackPublication = /** @class */ (function (_super) {
|
|
|
4772
5094
|
*/
|
|
4773
5095
|
module.exports = RemoteAudioTrackPublication;
|
|
4774
5096
|
|
|
4775
|
-
},{"./remotetrackpublication":
|
|
5097
|
+
},{"./remotetrackpublication":35}],32:[function(require,module,exports){
|
|
4776
5098
|
'use strict';
|
|
4777
5099
|
var __extends = (this && this.__extends) || (function () {
|
|
4778
5100
|
var extendStatics = function (d, b) {
|
|
@@ -4959,7 +5281,7 @@ var RemoteDataTrack = /** @class */ (function (_super) {
|
|
|
4959
5281
|
*/
|
|
4960
5282
|
module.exports = RemoteDataTrack;
|
|
4961
5283
|
|
|
4962
|
-
},{"../../util/constants":
|
|
5284
|
+
},{"../../util/constants":124,"./":18}],33:[function(require,module,exports){
|
|
4963
5285
|
'use strict';
|
|
4964
5286
|
var __extends = (this && this.__extends) || (function () {
|
|
4965
5287
|
var extendStatics = function (d, b) {
|
|
@@ -5021,7 +5343,7 @@ var RemoteDataTrackPublication = /** @class */ (function (_super) {
|
|
|
5021
5343
|
*/
|
|
5022
5344
|
module.exports = RemoteDataTrackPublication;
|
|
5023
5345
|
|
|
5024
|
-
},{"./remotetrackpublication":
|
|
5346
|
+
},{"./remotetrackpublication":35}],34:[function(require,module,exports){
|
|
5025
5347
|
'use strict';
|
|
5026
5348
|
var __extends = (this && this.__extends) || (function () {
|
|
5027
5349
|
var extendStatics = function (d, b) {
|
|
@@ -5307,7 +5629,7 @@ function playIfPausedWhileInBackground(remoteMediaTrack) {
|
|
|
5307
5629
|
*/
|
|
5308
5630
|
module.exports = mixinRemoteMediaTrack;
|
|
5309
5631
|
|
|
5310
|
-
},{"../../util/constants":
|
|
5632
|
+
},{"../../util/constants":124,"../../util/documentvisibilitymonitor.js":127,"../../webrtc/util":170}],35:[function(require,module,exports){
|
|
5311
5633
|
'use strict';
|
|
5312
5634
|
var __extends = (this && this.__extends) || (function () {
|
|
5313
5635
|
var extendStatics = function (d, b) {
|
|
@@ -5502,7 +5824,7 @@ var RemoteTrackPublication = /** @class */ (function (_super) {
|
|
|
5502
5824
|
*/
|
|
5503
5825
|
module.exports = RemoteTrackPublication;
|
|
5504
5826
|
|
|
5505
|
-
},{"./trackpublication":
|
|
5827
|
+
},{"./trackpublication":39}],36:[function(require,module,exports){
|
|
5506
5828
|
'use strict';
|
|
5507
5829
|
var __extends = (this && this.__extends) || (function () {
|
|
5508
5830
|
var extendStatics = function (d, b) {
|
|
@@ -5936,7 +6258,7 @@ function maybeUpdateDimensionHint(remoteVideoTrack) {
|
|
|
5936
6258
|
*/
|
|
5937
6259
|
module.exports = RemoteVideoTrack;
|
|
5938
6260
|
|
|
5939
|
-
},{"../../util/documentvisibilitymonitor.js":
|
|
6261
|
+
},{"../../util/documentvisibilitymonitor.js":127,"../../util/nullobserver.js":137,"../../util/timeout":144,"./remotemediatrack":34,"./videotrack":42}],37:[function(require,module,exports){
|
|
5940
6262
|
'use strict';
|
|
5941
6263
|
var __extends = (this && this.__extends) || (function () {
|
|
5942
6264
|
var extendStatics = function (d, b) {
|
|
@@ -6008,7 +6330,7 @@ var RemoteVideoTrackPublication = /** @class */ (function (_super) {
|
|
|
6008
6330
|
*/
|
|
6009
6331
|
module.exports = RemoteVideoTrackPublication;
|
|
6010
6332
|
|
|
6011
|
-
},{"./remotetrackpublication":
|
|
6333
|
+
},{"./remotetrackpublication":35}],38:[function(require,module,exports){
|
|
6012
6334
|
'use strict';
|
|
6013
6335
|
var __extends = (this && this.__extends) || (function () {
|
|
6014
6336
|
var extendStatics = function (d, b) {
|
|
@@ -6157,7 +6479,7 @@ var MediaTrackSender = /** @class */ (function (_super) {
|
|
|
6157
6479
|
*/
|
|
6158
6480
|
module.exports = MediaTrackSender;
|
|
6159
6481
|
|
|
6160
|
-
},{"./transceiver":
|
|
6482
|
+
},{"./transceiver":40}],39:[function(require,module,exports){
|
|
6161
6483
|
'use strict';
|
|
6162
6484
|
var __extends = (this && this.__extends) || (function () {
|
|
6163
6485
|
var extendStatics = function (d, b) {
|
|
@@ -6254,7 +6576,7 @@ var TrackPublication = /** @class */ (function (_super) {
|
|
|
6254
6576
|
*/
|
|
6255
6577
|
module.exports = TrackPublication;
|
|
6256
6578
|
|
|
6257
|
-
},{"../../eventemitter":10,"../../util":
|
|
6579
|
+
},{"../../eventemitter":10,"../../util":130,"../../util/constants":124,"../../util/log":134}],40:[function(require,module,exports){
|
|
6258
6580
|
'use strict';
|
|
6259
6581
|
var __extends = (this && this.__extends) || (function () {
|
|
6260
6582
|
var extendStatics = function (d, b) {
|
|
@@ -6321,7 +6643,7 @@ var MediaTrackTransceiver = /** @class */ (function (_super) {
|
|
|
6321
6643
|
}(TrackTransceiver));
|
|
6322
6644
|
module.exports = MediaTrackTransceiver;
|
|
6323
6645
|
|
|
6324
|
-
},{"../../transceiver":
|
|
6646
|
+
},{"../../transceiver":118}],41:[function(require,module,exports){
|
|
6325
6647
|
'use strict';
|
|
6326
6648
|
var __extends = (this && this.__extends) || (function () {
|
|
6327
6649
|
var extendStatics = function (d, b) {
|
|
@@ -6476,7 +6798,7 @@ var VideoProcessorEventObserver = /** @class */ (function (_super) {
|
|
|
6476
6798
|
}(EventEmitter));
|
|
6477
6799
|
module.exports = VideoProcessorEventObserver;
|
|
6478
6800
|
|
|
6479
|
-
},{"../../util/constants":
|
|
6801
|
+
},{"../../util/constants":124,"events":173}],42:[function(require,module,exports){
|
|
6480
6802
|
'use strict';
|
|
6481
6803
|
var __extends = (this && this.__extends) || (function () {
|
|
6482
6804
|
var extendStatics = function (d, b) {
|
|
@@ -6991,7 +7313,7 @@ function dimensionsChanged(track, elem) {
|
|
|
6991
7313
|
*/
|
|
6992
7314
|
module.exports = VideoTrack;
|
|
6993
7315
|
|
|
6994
|
-
},{"../../util/constants":
|
|
7316
|
+
},{"../../util/constants":124,"./mediatrack":27,"./videoprocessoreventobserver":41}],43:[function(require,module,exports){
|
|
6995
7317
|
'use strict';
|
|
6996
7318
|
var __extends = (this && this.__extends) || (function () {
|
|
6997
7319
|
var extendStatics = function (d, b) {
|
|
@@ -7090,7 +7412,163 @@ var NetworkQualityConfigurationImpl = /** @class */ (function (_super) {
|
|
|
7090
7412
|
}(EventEmitter));
|
|
7091
7413
|
module.exports = NetworkQualityConfigurationImpl;
|
|
7092
7414
|
|
|
7093
|
-
},{"./util":
|
|
7415
|
+
},{"./util":130,"./util/constants":124,"events":173}],44:[function(require,module,exports){
|
|
7416
|
+
/* eslint-disable no-console */
|
|
7417
|
+
'use strict';
|
|
7418
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7419
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7420
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7421
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7422
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7423
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7424
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7425
|
+
});
|
|
7426
|
+
};
|
|
7427
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
7428
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
7429
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
7430
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
7431
|
+
function step(op) {
|
|
7432
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
7433
|
+
while (_) try {
|
|
7434
|
+
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;
|
|
7435
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
7436
|
+
switch (op[0]) {
|
|
7437
|
+
case 0: case 1: t = op; break;
|
|
7438
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
7439
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
7440
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
7441
|
+
default:
|
|
7442
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
7443
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
7444
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
7445
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
7446
|
+
if (t[2]) _.ops.pop();
|
|
7447
|
+
_.trys.pop(); continue;
|
|
7448
|
+
}
|
|
7449
|
+
op = body.call(thisArg, _);
|
|
7450
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
7451
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7452
|
+
}
|
|
7453
|
+
};
|
|
7454
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7455
|
+
exports.createNoiseCancellationAudioProcessor = void 0;
|
|
7456
|
+
var Log = require('./util/log');
|
|
7457
|
+
var dynamicImport = require('./vendor/dynamicimport');
|
|
7458
|
+
var PLUGIN_CONFIG = {
|
|
7459
|
+
krisp: {
|
|
7460
|
+
supportedVersion: '1.0.0',
|
|
7461
|
+
pluginFile: 'krispsdk.mjs'
|
|
7462
|
+
},
|
|
7463
|
+
rnnoise: {
|
|
7464
|
+
supportedVersion: '0.6.0',
|
|
7465
|
+
pluginFile: 'rnnoise_sdk.mjs'
|
|
7466
|
+
}
|
|
7467
|
+
};
|
|
7468
|
+
var ensureVersionSupported = function (_a) {
|
|
7469
|
+
var supportedVersion = _a.supportedVersion, plugin = _a.plugin, log = _a.log;
|
|
7470
|
+
if (!plugin.getVersion || !plugin.isSupported) {
|
|
7471
|
+
throw new Error('Plugin does not export getVersion/isSupported api. Are you using old version of the plugin ?');
|
|
7472
|
+
}
|
|
7473
|
+
var pluginVersion = plugin.getVersion();
|
|
7474
|
+
log.debug("Plugin Version = " + pluginVersion);
|
|
7475
|
+
var supportedVersions = supportedVersion.split('.').map(function (version) { return Number(version); });
|
|
7476
|
+
var pluginVersions = pluginVersion.split('.').map(function (version) { return Number(version); });
|
|
7477
|
+
if (supportedVersions.length !== 3 || pluginVersions.length !== 3) {
|
|
7478
|
+
throw new Error("Unsupported Plugin version format: " + supportedVersion + ", " + pluginVersion);
|
|
7479
|
+
}
|
|
7480
|
+
if (supportedVersions[0] !== pluginVersions[0]) {
|
|
7481
|
+
throw new Error("Major version mismatch: [Plugin version " + pluginVersion + "], [Supported Version " + supportedVersion + "]");
|
|
7482
|
+
}
|
|
7483
|
+
if (pluginVersions[1] < supportedVersions[1]) {
|
|
7484
|
+
throw new Error("Minor version mismatch: [Plugin version " + pluginVersion + "] < [Supported Version " + supportedVersion + "]");
|
|
7485
|
+
}
|
|
7486
|
+
var tempContext = new AudioContext();
|
|
7487
|
+
var isSupported = plugin.isSupported(tempContext);
|
|
7488
|
+
tempContext.close();
|
|
7489
|
+
if (!isSupported) {
|
|
7490
|
+
throw new Error('Noise Cancellation plugin is not supported on your browser');
|
|
7491
|
+
}
|
|
7492
|
+
};
|
|
7493
|
+
var audioProcessors = new Map();
|
|
7494
|
+
function createNoiseCancellationAudioProcessor(noiseCancellationOptions, log) {
|
|
7495
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
7496
|
+
var audioProcessor, pluginConfig, supportedVersion, pluginFile, rootDir, sdkFilePath, dynamicModule, plugin_1, er_1;
|
|
7497
|
+
return __generator(this, function (_a) {
|
|
7498
|
+
switch (_a.label) {
|
|
7499
|
+
case 0:
|
|
7500
|
+
audioProcessor = audioProcessors.get(noiseCancellationOptions.vendor);
|
|
7501
|
+
if (!!audioProcessor) return [3 /*break*/, 6];
|
|
7502
|
+
pluginConfig = PLUGIN_CONFIG[noiseCancellationOptions.vendor];
|
|
7503
|
+
if (!pluginConfig) {
|
|
7504
|
+
throw new Error("Unsupported NoiseCancellationOptions.vendor: " + noiseCancellationOptions.vendor);
|
|
7505
|
+
}
|
|
7506
|
+
supportedVersion = pluginConfig.supportedVersion, pluginFile = pluginConfig.pluginFile;
|
|
7507
|
+
rootDir = noiseCancellationOptions.sdkAssetsPath;
|
|
7508
|
+
sdkFilePath = rootDir + "/" + pluginFile;
|
|
7509
|
+
_a.label = 1;
|
|
7510
|
+
case 1:
|
|
7511
|
+
_a.trys.push([1, 5, , 6]);
|
|
7512
|
+
log.debug('loading noise cancellation sdk: ', sdkFilePath);
|
|
7513
|
+
return [4 /*yield*/, dynamicImport(sdkFilePath)];
|
|
7514
|
+
case 2:
|
|
7515
|
+
dynamicModule = _a.sent();
|
|
7516
|
+
log.debug('Loaded noise cancellation sdk:', dynamicModule);
|
|
7517
|
+
plugin_1 = dynamicModule.default;
|
|
7518
|
+
ensureVersionSupported({
|
|
7519
|
+
supportedVersion: supportedVersion,
|
|
7520
|
+
plugin: plugin_1,
|
|
7521
|
+
log: log
|
|
7522
|
+
});
|
|
7523
|
+
if (!!plugin_1.isInitialized()) return [3 /*break*/, 4];
|
|
7524
|
+
log.debug('initializing noise cancellation sdk: ', rootDir);
|
|
7525
|
+
return [4 /*yield*/, plugin_1.init({ rootDir: rootDir })];
|
|
7526
|
+
case 3:
|
|
7527
|
+
_a.sent();
|
|
7528
|
+
log.debug('noise cancellation sdk initialized!');
|
|
7529
|
+
_a.label = 4;
|
|
7530
|
+
case 4:
|
|
7531
|
+
audioProcessor = {
|
|
7532
|
+
vendor: noiseCancellationOptions.vendor,
|
|
7533
|
+
isInitialized: function () { return plugin_1.isInitialized(); },
|
|
7534
|
+
isConnected: function () { return plugin_1.isConnected(); },
|
|
7535
|
+
isEnabled: function () { return plugin_1.isEnabled(); },
|
|
7536
|
+
disconnect: function () { return plugin_1.disconnect(); },
|
|
7537
|
+
enable: function () { return plugin_1.enable(); },
|
|
7538
|
+
disable: function () { return plugin_1.disable(); },
|
|
7539
|
+
destroy: function () { return plugin_1.destroy(); },
|
|
7540
|
+
setLogging: function (enable) { return plugin_1.setLogging(enable); },
|
|
7541
|
+
connect: function (sourceTrack) {
|
|
7542
|
+
log.debug('connect: ', sourceTrack.id);
|
|
7543
|
+
if (plugin_1.isConnected()) {
|
|
7544
|
+
plugin_1.disconnect();
|
|
7545
|
+
}
|
|
7546
|
+
var mediaStream = plugin_1.connect(new MediaStream([sourceTrack]));
|
|
7547
|
+
if (!mediaStream) {
|
|
7548
|
+
throw new Error('Error connecting with noise cancellation sdk');
|
|
7549
|
+
}
|
|
7550
|
+
var cleanTrack = mediaStream.getAudioTracks()[0];
|
|
7551
|
+
if (!cleanTrack) {
|
|
7552
|
+
throw new Error('Error getting clean track from noise cancellation sdk');
|
|
7553
|
+
}
|
|
7554
|
+
plugin_1.enable();
|
|
7555
|
+
return cleanTrack;
|
|
7556
|
+
},
|
|
7557
|
+
};
|
|
7558
|
+
audioProcessors.set(noiseCancellationOptions.vendor, audioProcessor);
|
|
7559
|
+
return [3 /*break*/, 6];
|
|
7560
|
+
case 5:
|
|
7561
|
+
er_1 = _a.sent();
|
|
7562
|
+
log.error("Error loading noise cancellation sdk:" + sdkFilePath, er_1);
|
|
7563
|
+
throw er_1;
|
|
7564
|
+
case 6: return [2 /*return*/, audioProcessor];
|
|
7565
|
+
}
|
|
7566
|
+
});
|
|
7567
|
+
});
|
|
7568
|
+
}
|
|
7569
|
+
exports.createNoiseCancellationAudioProcessor = createNoiseCancellationAudioProcessor;
|
|
7570
|
+
|
|
7571
|
+
},{"./util/log":134,"./vendor/dynamicimport":149}],45:[function(require,module,exports){
|
|
7094
7572
|
'use strict';
|
|
7095
7573
|
var __extends = (this && this.__extends) || (function () {
|
|
7096
7574
|
var extendStatics = function (d, b) {
|
|
@@ -7707,7 +8185,7 @@ function reemitTrackPublicationEvents(participant, publication) {
|
|
|
7707
8185
|
}
|
|
7708
8186
|
module.exports = Participant;
|
|
7709
8187
|
|
|
7710
|
-
},{"./eventemitter":10,"./media/track/remoteaudiotrack":
|
|
8188
|
+
},{"./eventemitter":10,"./media/track/remoteaudiotrack":30,"./media/track/remoteaudiotrackpublication":31,"./media/track/remotedatatrack":32,"./media/track/remotedatatrackpublication":33,"./media/track/remotevideotrack":36,"./media/track/remotevideotrackpublication":37,"./util":130}],46:[function(require,module,exports){
|
|
7711
8189
|
"use strict";
|
|
7712
8190
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7713
8191
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -7861,7 +8339,7 @@ function extractSelectedActiveCandidatePair(stats) {
|
|
|
7861
8339
|
};
|
|
7862
8340
|
}
|
|
7863
8341
|
|
|
7864
|
-
},{}],
|
|
8342
|
+
},{}],47:[function(require,module,exports){
|
|
7865
8343
|
"use strict";
|
|
7866
8344
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7867
8345
|
exports.getTurnCredentials = void 0;
|
|
@@ -7909,7 +8387,7 @@ function getTurnCredentials(token, wsServer) {
|
|
|
7909
8387
|
}
|
|
7910
8388
|
exports.getTurnCredentials = getTurnCredentials;
|
|
7911
8389
|
|
|
7912
|
-
},{"../twilioconnection.js":
|
|
8390
|
+
},{"../twilioconnection.js":119,"../util/constants":124,"../util/twilio-video-errors":145,"events":173}],48:[function(require,module,exports){
|
|
7913
8391
|
"use strict";
|
|
7914
8392
|
var __read = (this && this.__read) || function (o, n) {
|
|
7915
8393
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -7950,7 +8428,7 @@ function makeStat(values) {
|
|
|
7950
8428
|
}
|
|
7951
8429
|
exports.makeStat = makeStat;
|
|
7952
8430
|
|
|
7953
|
-
},{}],
|
|
8431
|
+
},{}],49:[function(require,module,exports){
|
|
7954
8432
|
"use strict";
|
|
7955
8433
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7956
8434
|
exports.mosToScore = exports.calculateMOS = void 0;
|
|
@@ -8011,7 +8489,7 @@ function mosToScore(mosValue) {
|
|
|
8011
8489
|
}
|
|
8012
8490
|
exports.mosToScore = mosToScore;
|
|
8013
8491
|
|
|
8014
|
-
},{}],
|
|
8492
|
+
},{}],50:[function(require,module,exports){
|
|
8015
8493
|
"use strict";
|
|
8016
8494
|
var __extends = (this && this.__extends) || (function () {
|
|
8017
8495
|
var extendStatics = function (d, b) {
|
|
@@ -8085,7 +8563,7 @@ var getturncredentials_1 = require("./getturncredentials");
|
|
|
8085
8563
|
var makestat_1 = require("./makestat");
|
|
8086
8564
|
var syntheticaudio_1 = require("./syntheticaudio");
|
|
8087
8565
|
var syntheticvideo_1 = require("./syntheticvideo");
|
|
8088
|
-
var
|
|
8566
|
+
var index_1 = require("../util/index");
|
|
8089
8567
|
var WS_SERVER = require('../util/constants').WS_SERVER;
|
|
8090
8568
|
var Log = require('../util/log');
|
|
8091
8569
|
var EventEmitter = require('../eventemitter');
|
|
@@ -8512,7 +8990,7 @@ var PreflightTest = /** @class */ (function (_super) {
|
|
|
8512
8990
|
case 0:
|
|
8513
8991
|
startTime = Date.now();
|
|
8514
8992
|
STAT_INTERVAL = Math.min(1000, duration);
|
|
8515
|
-
return [4 /*yield*/,
|
|
8993
|
+
return [4 /*yield*/, index_1.waitForSometime(STAT_INTERVAL)];
|
|
8516
8994
|
case 1:
|
|
8517
8995
|
_a.sent();
|
|
8518
8996
|
return [4 /*yield*/, this._collectRTCStats(collectedStats, senderPC, receiverPC)];
|
|
@@ -8655,7 +9133,7 @@ function runPreflight(token, options) {
|
|
|
8655
9133
|
}
|
|
8656
9134
|
exports.runPreflight = runPreflight;
|
|
8657
9135
|
|
|
8658
|
-
},{"../eventemitter":10,"../util":
|
|
9136
|
+
},{"../eventemitter":10,"../util/constants":124,"../util/eventobserver":128,"../util/index":130,"../util/insightspublisher":131,"../util/log":134,"../util/movingaveragedelta":135,"../util/sid":142,"../util/twilio-video-errors":145,"./getCombinedConnectionStats":46,"./getturncredentials":47,"./makestat":48,"./mos":49,"./syntheticaudio":51,"./syntheticvideo":52,"./timer":53}],51:[function(require,module,exports){
|
|
8659
9137
|
"use strict";
|
|
8660
9138
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8661
9139
|
exports.syntheticAudio = void 0;
|
|
@@ -8678,7 +9156,7 @@ function syntheticAudio() {
|
|
|
8678
9156
|
}
|
|
8679
9157
|
exports.syntheticAudio = syntheticAudio;
|
|
8680
9158
|
|
|
8681
|
-
},{"../webaudio/audiocontext":
|
|
9159
|
+
},{"../webaudio/audiocontext":152}],52:[function(require,module,exports){
|
|
8682
9160
|
"use strict";
|
|
8683
9161
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8684
9162
|
exports.syntheticVideo = void 0;
|
|
@@ -8712,7 +9190,7 @@ function syntheticVideo(_a) {
|
|
|
8712
9190
|
}
|
|
8713
9191
|
exports.syntheticVideo = syntheticVideo;
|
|
8714
9192
|
|
|
8715
|
-
},{}],
|
|
9193
|
+
},{}],53:[function(require,module,exports){
|
|
8716
9194
|
"use strict";
|
|
8717
9195
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8718
9196
|
exports.Timer = void 0;
|
|
@@ -8742,7 +9220,7 @@ var Timer = /** @class */ (function () {
|
|
|
8742
9220
|
}());
|
|
8743
9221
|
exports.Timer = Timer;
|
|
8744
9222
|
|
|
8745
|
-
},{}],
|
|
9223
|
+
},{}],54:[function(require,module,exports){
|
|
8746
9224
|
'use strict';
|
|
8747
9225
|
var __extends = (this && this.__extends) || (function () {
|
|
8748
9226
|
var extendStatics = function (d, b) {
|
|
@@ -8843,7 +9321,7 @@ var QueueingEventEmitter = /** @class */ (function (_super) {
|
|
|
8843
9321
|
}(EventEmitter));
|
|
8844
9322
|
module.exports = QueueingEventEmitter;
|
|
8845
9323
|
|
|
8846
|
-
},{"events":
|
|
9324
|
+
},{"events":173}],55:[function(require,module,exports){
|
|
8847
9325
|
'use strict';
|
|
8848
9326
|
var __extends = (this && this.__extends) || (function () {
|
|
8849
9327
|
var extendStatics = function (d, b) {
|
|
@@ -9124,7 +9602,7 @@ var RemoteParticipant = /** @class */ (function (_super) {
|
|
|
9124
9602
|
*/
|
|
9125
9603
|
module.exports = RemoteParticipant;
|
|
9126
9604
|
|
|
9127
|
-
},{"./participant":
|
|
9605
|
+
},{"./participant":45}],56:[function(require,module,exports){
|
|
9128
9606
|
'use strict';
|
|
9129
9607
|
var __extends = (this && this.__extends) || (function () {
|
|
9130
9608
|
var extendStatics = function (d, b) {
|
|
@@ -9288,6 +9766,7 @@ var Room = /** @class */ (function (_super) {
|
|
|
9288
9766
|
handleLocalParticipantEvents(_this, localParticipant);
|
|
9289
9767
|
handleRecordingEvents(_this, signaling.recording);
|
|
9290
9768
|
handleSignalingEvents(_this, signaling);
|
|
9769
|
+
verifyNoiseCancellation(_this);
|
|
9291
9770
|
log.info('Created a new Room:', _this.name);
|
|
9292
9771
|
log.debug('Initial RemoteParticipants:', Array.from(_this._participants.values()));
|
|
9293
9772
|
return _this;
|
|
@@ -9327,6 +9806,17 @@ var Room = /** @class */ (function (_super) {
|
|
|
9327
9806
|
};
|
|
9328
9807
|
return Room;
|
|
9329
9808
|
}(EventEmitter));
|
|
9809
|
+
function verifyNoiseCancellation(room) {
|
|
9810
|
+
var allowedAudioProcessors = room.localParticipant._signaling.audioProcessors;
|
|
9811
|
+
room.localParticipant.audioTracks.forEach(function (_a) {
|
|
9812
|
+
var track = _a.track;
|
|
9813
|
+
var noiseCancellation = track.noiseCancellation;
|
|
9814
|
+
if (noiseCancellation && !allowedAudioProcessors.includes(noiseCancellation.vendor)) {
|
|
9815
|
+
room._log.warn(noiseCancellation.vendor + " is not supported in this room. disabling it permanently");
|
|
9816
|
+
noiseCancellation.disablePermanently();
|
|
9817
|
+
}
|
|
9818
|
+
});
|
|
9819
|
+
}
|
|
9330
9820
|
function rewriteLocalTrackIds(room, trackStats) {
|
|
9331
9821
|
var localParticipantSignaling = room.localParticipant._signaling;
|
|
9332
9822
|
return trackStats.reduce(function (trackStats, trackStat) {
|
|
@@ -9739,7 +10229,7 @@ function handleSignalingEvents(room, signaling) {
|
|
|
9739
10229
|
}
|
|
9740
10230
|
module.exports = Room;
|
|
9741
10231
|
|
|
9742
|
-
},{"./eventemitter":10,"./remoteparticipant":
|
|
10232
|
+
},{"./eventemitter":10,"./remoteparticipant":55,"./stats/statsreport":115,"./util":130}],57:[function(require,module,exports){
|
|
9743
10233
|
/* eslint consistent-return:0 */
|
|
9744
10234
|
'use strict';
|
|
9745
10235
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -9909,7 +10399,7 @@ var Signaling = /** @class */ (function (_super) {
|
|
|
9909
10399
|
}(StateMachine));
|
|
9910
10400
|
module.exports = Signaling;
|
|
9911
10401
|
|
|
9912
|
-
},{"../statemachine":
|
|
10402
|
+
},{"../statemachine":87,"./participant":60,"./room":64}],58:[function(require,module,exports){
|
|
9913
10403
|
'use strict';
|
|
9914
10404
|
var __extends = (this && this.__extends) || (function () {
|
|
9915
10405
|
var extendStatics = function (d, b) {
|
|
@@ -9945,10 +10435,12 @@ var LocalParticipantSignaling = /** @class */ (function (_super) {
|
|
|
9945
10435
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
9946
10436
|
* @param {string} name
|
|
9947
10437
|
* @param {Track.Priority} priority
|
|
10438
|
+
* @param {?NoiseCancellationVendor} noiseCancellationVendor
|
|
9948
10439
|
* @returns {LocalTrackPublicationSignaling} publication
|
|
9949
10440
|
*/
|
|
9950
|
-
LocalParticipantSignaling.prototype.addTrack = function (trackSender, name, priority) {
|
|
9951
|
-
|
|
10441
|
+
LocalParticipantSignaling.prototype.addTrack = function (trackSender, name, priority, noiseCancellationVendor) {
|
|
10442
|
+
if (noiseCancellationVendor === void 0) { noiseCancellationVendor = null; }
|
|
10443
|
+
var publication = this._createLocalTrackPublicationSignaling(trackSender, name, priority, noiseCancellationVendor);
|
|
9952
10444
|
this._trackSendersToPublications.set(trackSender, publication);
|
|
9953
10445
|
this._publicationsToTrackSenders.set(publication, trackSender);
|
|
9954
10446
|
_super.prototype.addTrack.call(this, publication);
|
|
@@ -9989,7 +10481,7 @@ var LocalParticipantSignaling = /** @class */ (function (_super) {
|
|
|
9989
10481
|
}(ParticipantSignaling));
|
|
9990
10482
|
module.exports = LocalParticipantSignaling;
|
|
9991
10483
|
|
|
9992
|
-
},{"./participant":
|
|
10484
|
+
},{"./participant":60}],59:[function(require,module,exports){
|
|
9993
10485
|
'use strict';
|
|
9994
10486
|
var __extends = (this && this.__extends) || (function () {
|
|
9995
10487
|
var extendStatics = function (d, b) {
|
|
@@ -10120,7 +10612,7 @@ function setError(publication, error) {
|
|
|
10120
10612
|
}
|
|
10121
10613
|
module.exports = LocalTrackPublicationSignaling;
|
|
10122
10614
|
|
|
10123
|
-
},{"./track":
|
|
10615
|
+
},{"./track":65}],60:[function(require,module,exports){
|
|
10124
10616
|
'use strict';
|
|
10125
10617
|
var __extends = (this && this.__extends) || (function () {
|
|
10126
10618
|
var extendStatics = function (d, b) {
|
|
@@ -10345,7 +10837,7 @@ var ParticipantSignaling = /** @class */ (function (_super) {
|
|
|
10345
10837
|
*/
|
|
10346
10838
|
module.exports = ParticipantSignaling;
|
|
10347
10839
|
|
|
10348
|
-
},{"../statemachine":
|
|
10840
|
+
},{"../statemachine":87,"../stats/networkqualitystats":102}],61:[function(require,module,exports){
|
|
10349
10841
|
'use strict';
|
|
10350
10842
|
var __extends = (this && this.__extends) || (function () {
|
|
10351
10843
|
var extendStatics = function (d, b) {
|
|
@@ -10418,7 +10910,7 @@ var RecordingSignaling = /** @class */ (function (_super) {
|
|
|
10418
10910
|
*/
|
|
10419
10911
|
module.exports = RecordingSignaling;
|
|
10420
10912
|
|
|
10421
|
-
},{"events":
|
|
10913
|
+
},{"events":173}],62:[function(require,module,exports){
|
|
10422
10914
|
'use strict';
|
|
10423
10915
|
var __extends = (this && this.__extends) || (function () {
|
|
10424
10916
|
var extendStatics = function (d, b) {
|
|
@@ -10458,7 +10950,7 @@ var RemoteParticipantSignaling = /** @class */ (function (_super) {
|
|
|
10458
10950
|
}(ParticipantSignaling));
|
|
10459
10951
|
module.exports = RemoteParticipantSignaling;
|
|
10460
10952
|
|
|
10461
|
-
},{"./participant":
|
|
10953
|
+
},{"./participant":60}],63:[function(require,module,exports){
|
|
10462
10954
|
'use strict';
|
|
10463
10955
|
var __extends = (this && this.__extends) || (function () {
|
|
10464
10956
|
var extendStatics = function (d, b) {
|
|
@@ -10563,7 +11055,7 @@ var RemoteTrackPublicationSignaling = /** @class */ (function (_super) {
|
|
|
10563
11055
|
}(TrackSignaling));
|
|
10564
11056
|
module.exports = RemoteTrackPublicationSignaling;
|
|
10565
11057
|
|
|
10566
|
-
},{"./track":
|
|
11058
|
+
},{"./track":65}],64:[function(require,module,exports){
|
|
10567
11059
|
'use strict';
|
|
10568
11060
|
var __extends = (this && this.__extends) || (function () {
|
|
10569
11061
|
var extendStatics = function (d, b) {
|
|
@@ -10844,7 +11336,7 @@ function maybeUpdateState(roomSignaling) {
|
|
|
10844
11336
|
}
|
|
10845
11337
|
module.exports = RoomSignaling;
|
|
10846
11338
|
|
|
10847
|
-
},{"../statemachine":
|
|
11339
|
+
},{"../statemachine":87,"../util":130,"../util/constants":124,"../util/log":134,"../util/timeout":144,"../util/twilio-video-errors":145,"./recording":61}],65:[function(require,module,exports){
|
|
10848
11340
|
'use strict';
|
|
10849
11341
|
var __extends = (this && this.__extends) || (function () {
|
|
10850
11342
|
var extendStatics = function (d, b) {
|
|
@@ -11027,7 +11519,7 @@ var TrackSignaling = /** @class */ (function (_super) {
|
|
|
11027
11519
|
*/
|
|
11028
11520
|
module.exports = TrackSignaling;
|
|
11029
11521
|
|
|
11030
|
-
},{"events":
|
|
11522
|
+
},{"events":173}],66:[function(require,module,exports){
|
|
11031
11523
|
'use strict';
|
|
11032
11524
|
var CancelablePromise = require('../../util/cancelablepromise');
|
|
11033
11525
|
var DefaultPeerConnectionManager = require('./peerconnectionmanager');
|
|
@@ -11116,8 +11608,6 @@ function createCancelableRoomSignalingPromise(token, wsServer, localParticipant,
|
|
|
11116
11608
|
reject(new SignalingIncomingMessageInvalidError());
|
|
11117
11609
|
return;
|
|
11118
11610
|
}
|
|
11119
|
-
var signalingRegion = initialState.options.signaling_region;
|
|
11120
|
-
localParticipant.setSignalingRegion(signalingRegion);
|
|
11121
11611
|
resolve(new RoomV2(localParticipant, initialState, transport, peerConnectionManager, options));
|
|
11122
11612
|
});
|
|
11123
11613
|
transport.once('stateChanged', function (state, error) {
|
|
@@ -11146,7 +11636,7 @@ function createCancelableRoomSignalingPromise(token, wsServer, localParticipant,
|
|
|
11146
11636
|
}
|
|
11147
11637
|
module.exports = createCancelableRoomSignalingPromise;
|
|
11148
11638
|
|
|
11149
|
-
},{"../../util":
|
|
11639
|
+
},{"../../util":130,"../../util/cancelablepromise":123,"../../util/twilio-video-errors":145,"./peerconnectionmanager":77,"./room":83,"./twilioconnectiontransport":86}],67:[function(require,module,exports){
|
|
11150
11640
|
'use strict';
|
|
11151
11641
|
var __extends = (this && this.__extends) || (function () {
|
|
11152
11642
|
var extendStatics = function (d, b) {
|
|
@@ -11224,7 +11714,7 @@ var DominantSpeakerSignaling = /** @class */ (function (_super) {
|
|
|
11224
11714
|
*/
|
|
11225
11715
|
module.exports = DominantSpeakerSignaling;
|
|
11226
11716
|
|
|
11227
|
-
},{"./mediasignaling":
|
|
11717
|
+
},{"./mediasignaling":73}],68:[function(require,module,exports){
|
|
11228
11718
|
'use strict';
|
|
11229
11719
|
var Filter = require('../../util/filter');
|
|
11230
11720
|
/**
|
|
@@ -11292,7 +11782,7 @@ var IceBox = /** @class */ (function () {
|
|
|
11292
11782
|
}());
|
|
11293
11783
|
module.exports = IceBox;
|
|
11294
11784
|
|
|
11295
|
-
},{"../../util/filter":
|
|
11785
|
+
},{"../../util/filter":129}],69:[function(require,module,exports){
|
|
11296
11786
|
'use strict';
|
|
11297
11787
|
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
11788
|
/**
|
|
@@ -11425,7 +11915,7 @@ var IceConnectionMonitor = /** @class */ (function () {
|
|
|
11425
11915
|
}());
|
|
11426
11916
|
module.exports = IceConnectionMonitor;
|
|
11427
11917
|
|
|
11428
|
-
},{"../../util/constants":
|
|
11918
|
+
},{"../../util/constants":124}],70:[function(require,module,exports){
|
|
11429
11919
|
'use strict';
|
|
11430
11920
|
var __extends = (this && this.__extends) || (function () {
|
|
11431
11921
|
var extendStatics = function (d, b) {
|
|
@@ -11490,7 +11980,7 @@ var SignalingV2 = /** @class */ (function (_super) {
|
|
|
11490
11980
|
}(Signaling));
|
|
11491
11981
|
module.exports = SignalingV2;
|
|
11492
11982
|
|
|
11493
|
-
},{"../":
|
|
11983
|
+
},{"../":57,"./cancelableroomsignalingpromise":66,"./localparticipant":71}],71:[function(require,module,exports){
|
|
11494
11984
|
'use strict';
|
|
11495
11985
|
var __extends = (this && this.__extends) || (function () {
|
|
11496
11986
|
var extendStatics = function (d, b) {
|
|
@@ -11570,6 +12060,10 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11570
12060
|
value: null,
|
|
11571
12061
|
writable: true
|
|
11572
12062
|
},
|
|
12063
|
+
audioProcessors: {
|
|
12064
|
+
value: [],
|
|
12065
|
+
writable: true
|
|
12066
|
+
},
|
|
11573
12067
|
bandwidthProfile: {
|
|
11574
12068
|
enumerable: true,
|
|
11575
12069
|
get: function () {
|
|
@@ -11627,6 +12121,13 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11627
12121
|
this.didUpdate();
|
|
11628
12122
|
}
|
|
11629
12123
|
};
|
|
12124
|
+
/**
|
|
12125
|
+
* Sets the AudioProcessors enabled for this room.
|
|
12126
|
+
* @param {string[]} audioProcessors
|
|
12127
|
+
*/
|
|
12128
|
+
LocalParticipantV2.prototype.setAudioProcessors = function (audioProcessors) {
|
|
12129
|
+
this.audioProcessors = audioProcessors;
|
|
12130
|
+
};
|
|
11630
12131
|
/**
|
|
11631
12132
|
* returns current {@link EncodingParametersImpl}.
|
|
11632
12133
|
* @returns {EncodingParametersImpl}
|
|
@@ -11678,10 +12179,11 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11678
12179
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
11679
12180
|
* @param {string} name
|
|
11680
12181
|
* @param {Track.Priority} priority
|
|
12182
|
+
* @param {?NoiseCancellationVendor} noiseCancellationVendor
|
|
11681
12183
|
* @returns {LocalTrackPublicationV2}
|
|
11682
12184
|
*/
|
|
11683
|
-
LocalParticipantV2.prototype._createLocalTrackPublicationSignaling = function (trackSender, name, priority) {
|
|
11684
|
-
return new this._LocalTrackPublicationV2(trackSender, name, priority, { log: this._log });
|
|
12185
|
+
LocalParticipantV2.prototype._createLocalTrackPublicationSignaling = function (trackSender, name, priority, noiseCancellationVendor) {
|
|
12186
|
+
return new this._LocalTrackPublicationV2(trackSender, name, priority, noiseCancellationVendor, { log: this._log });
|
|
11685
12187
|
};
|
|
11686
12188
|
/**
|
|
11687
12189
|
* Add a {@link LocalTrackPublicationV2} for the given {@link DataTrackSender}
|
|
@@ -11691,9 +12193,9 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11691
12193
|
* @param {Track.Priority} priority
|
|
11692
12194
|
* @returns {this}
|
|
11693
12195
|
*/
|
|
11694
|
-
LocalParticipantV2.prototype.addTrack = function (trackSender, name, priority) {
|
|
12196
|
+
LocalParticipantV2.prototype.addTrack = function (trackSender, name, priority, noiseCancellationVendor) {
|
|
11695
12197
|
var _this = this;
|
|
11696
|
-
_super.prototype.addTrack.call(this, trackSender, name, priority);
|
|
12198
|
+
_super.prototype.addTrack.call(this, trackSender, name, priority, noiseCancellationVendor);
|
|
11697
12199
|
var publication = this.getPublication(trackSender);
|
|
11698
12200
|
var isEnabled = publication.isEnabled, updatedPriority = publication.updatedPriority;
|
|
11699
12201
|
var updated = function () {
|
|
@@ -11818,7 +12320,7 @@ var LocalParticipantV2 = /** @class */ (function (_super) {
|
|
|
11818
12320
|
*/
|
|
11819
12321
|
module.exports = LocalParticipantV2;
|
|
11820
12322
|
|
|
11821
|
-
},{"../../util":
|
|
12323
|
+
},{"../../util":130,"../../util/constants":124,"../../util/log":134,"../localparticipant":58,"./localtrackpublication":72}],72:[function(require,module,exports){
|
|
11822
12324
|
'use strict';
|
|
11823
12325
|
var __extends = (this && this.__extends) || (function () {
|
|
11824
12326
|
var extendStatics = function (d, b) {
|
|
@@ -11848,9 +12350,10 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11848
12350
|
* @param {DataTrackSender|MediaTrackSender} trackSender
|
|
11849
12351
|
* @param {string} name
|
|
11850
12352
|
* @param {Track.Priority} priority
|
|
12353
|
+
* @param {?NoiseCancellationVendor} noiseCancellationVendor
|
|
11851
12354
|
* @param {object} [options]
|
|
11852
12355
|
*/
|
|
11853
|
-
function LocalTrackPublicationV2(trackSender, name, priority, options) {
|
|
12356
|
+
function LocalTrackPublicationV2(trackSender, name, priority, noiseCancellationVendor, options) {
|
|
11854
12357
|
var _this = _super.call(this, trackSender, name, priority) || this;
|
|
11855
12358
|
Object.defineProperties(_this, {
|
|
11856
12359
|
_log: {
|
|
@@ -11859,6 +12362,9 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11859
12362
|
_mediaStates: {
|
|
11860
12363
|
value: { recordings: null },
|
|
11861
12364
|
writable: true
|
|
12365
|
+
},
|
|
12366
|
+
_noiseCancellationVendor: {
|
|
12367
|
+
value: noiseCancellationVendor,
|
|
11862
12368
|
}
|
|
11863
12369
|
});
|
|
11864
12370
|
return _this;
|
|
@@ -11868,13 +12374,18 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11868
12374
|
* @returns {LocalTrackPublicationV2#Representation} - without the SID
|
|
11869
12375
|
*/
|
|
11870
12376
|
LocalTrackPublicationV2.prototype.getState = function () {
|
|
11871
|
-
|
|
12377
|
+
var state = {
|
|
11872
12378
|
enabled: this.isEnabled,
|
|
11873
12379
|
id: this.id,
|
|
11874
12380
|
kind: this.kind,
|
|
11875
12381
|
name: this.name,
|
|
11876
|
-
priority: this.updatedPriority
|
|
12382
|
+
priority: this.updatedPriority,
|
|
11877
12383
|
};
|
|
12384
|
+
if (this._noiseCancellationVendor) {
|
|
12385
|
+
// eslint-disable-next-line camelcase
|
|
12386
|
+
state.audio_processor = this._noiseCancellationVendor;
|
|
12387
|
+
}
|
|
12388
|
+
return state;
|
|
11878
12389
|
};
|
|
11879
12390
|
LocalTrackPublicationV2.prototype.toString = function () {
|
|
11880
12391
|
return "[LocalTrackPublicationV2: " + this.sid + "]";
|
|
@@ -11936,7 +12447,7 @@ var LocalTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
11936
12447
|
*/
|
|
11937
12448
|
module.exports = LocalTrackPublicationV2;
|
|
11938
12449
|
|
|
11939
|
-
},{"../../util/twilio-video-errors":
|
|
12450
|
+
},{"../../util/twilio-video-errors":145,"../../util/twiliowarning":147,"../localtrackpublication":59}],73:[function(require,module,exports){
|
|
11940
12451
|
/* eslint callback-return:0 */
|
|
11941
12452
|
'use strict';
|
|
11942
12453
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -12033,7 +12544,7 @@ var MediaSignaling = /** @class */ (function (_super) {
|
|
|
12033
12544
|
}(EventEmitter));
|
|
12034
12545
|
module.exports = MediaSignaling;
|
|
12035
12546
|
|
|
12036
|
-
},{"events":
|
|
12547
|
+
},{"events":173}],74:[function(require,module,exports){
|
|
12037
12548
|
/* eslint callback-return:0 */
|
|
12038
12549
|
'use strict';
|
|
12039
12550
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -12192,7 +12703,7 @@ function next(monitor) {
|
|
|
12192
12703
|
*/
|
|
12193
12704
|
module.exports = NetworkQualityMonitor;
|
|
12194
12705
|
|
|
12195
|
-
},{"../../stats/peerconnectionreportfactory":
|
|
12706
|
+
},{"../../stats/peerconnectionreportfactory":105,"events":173}],75:[function(require,module,exports){
|
|
12196
12707
|
'use strict';
|
|
12197
12708
|
var __extends = (this && this.__extends) || (function () {
|
|
12198
12709
|
var extendStatics = function (d, b) {
|
|
@@ -12457,7 +12968,7 @@ function createNetworkQualityInputsMessage(networkQualityInputs, networkQualityR
|
|
|
12457
12968
|
}
|
|
12458
12969
|
module.exports = NetworkQualitySignaling;
|
|
12459
12970
|
|
|
12460
|
-
},{"../../util/asyncvar":
|
|
12971
|
+
},{"../../util/asyncvar":120,"../../util/timeout":144,"./mediasignaling":73}],76:[function(require,module,exports){
|
|
12461
12972
|
'use strict';
|
|
12462
12973
|
var __extends = (this && this.__extends) || (function () {
|
|
12463
12974
|
var extendStatics = function (d, b) {
|
|
@@ -14310,7 +14821,7 @@ function setMaxBitrate(params, maxBitrate) {
|
|
|
14310
14821
|
}
|
|
14311
14822
|
module.exports = PeerConnectionV2;
|
|
14312
14823
|
|
|
14313
|
-
},{"../../data/receiver":5,"../../media/track/receiver":
|
|
14824
|
+
},{"../../data/receiver":5,"../../media/track/receiver":29,"../../statemachine":87,"../../util":130,"../../util/backoff":121,"../../util/constants":124,"../../util/log":134,"../../util/sdp":138,"../../util/sdp/issue8329":139,"../../util/sdp/trackmatcher":141,"../../util/timeout":144,"../../util/twilio-video-errors":145,"../../webrtc":157,"../../webrtc/util":170,"./icebox":68,"./iceconnectionmonitor.js":69}],77:[function(require,module,exports){
|
|
14314
14825
|
'use strict';
|
|
14315
14826
|
var __extends = (this && this.__extends) || (function () {
|
|
14316
14827
|
var extendStatics = function (d, b) {
|
|
@@ -14878,7 +15389,7 @@ function updateConnectionState(pcm) {
|
|
|
14878
15389
|
}
|
|
14879
15390
|
module.exports = PeerConnectionManager;
|
|
14880
15391
|
|
|
14881
|
-
},{"../../media/track/sender":
|
|
15392
|
+
},{"../../media/track/sender":38,"../../queueingeventemitter":54,"../../util":130,"../../util/twilio-video-errors":145,"../../webaudio/audiocontext":152,"../../webrtc/util":170,"./peerconnection":76}],78:[function(require,module,exports){
|
|
14882
15393
|
/* eslint callback-return:0 */
|
|
14883
15394
|
'use strict';
|
|
14884
15395
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -14964,7 +15475,7 @@ var PublisherHintsSignaling = /** @class */ (function (_super) {
|
|
|
14964
15475
|
}(MediaSignaling));
|
|
14965
15476
|
module.exports = PublisherHintsSignaling;
|
|
14966
15477
|
|
|
14967
|
-
},{"./mediasignaling":
|
|
15478
|
+
},{"./mediasignaling":73}],79:[function(require,module,exports){
|
|
14968
15479
|
'use strict';
|
|
14969
15480
|
var __extends = (this && this.__extends) || (function () {
|
|
14970
15481
|
var extendStatics = function (d, b) {
|
|
@@ -15024,7 +15535,7 @@ var RecordingV2 = /** @class */ (function (_super) {
|
|
|
15024
15535
|
*/
|
|
15025
15536
|
module.exports = RecordingV2;
|
|
15026
15537
|
|
|
15027
|
-
},{"../recording":
|
|
15538
|
+
},{"../recording":61}],80:[function(require,module,exports){
|
|
15028
15539
|
'use strict';
|
|
15029
15540
|
var __extends = (this && this.__extends) || (function () {
|
|
15030
15541
|
var extendStatics = function (d, b) {
|
|
@@ -15144,7 +15655,7 @@ var RemoteParticipantV2 = /** @class */ (function (_super) {
|
|
|
15144
15655
|
}(RemoteParticipantSignaling));
|
|
15145
15656
|
module.exports = RemoteParticipantV2;
|
|
15146
15657
|
|
|
15147
|
-
},{"../remoteparticipant":
|
|
15658
|
+
},{"../remoteparticipant":62,"./remotetrackpublication":81}],81:[function(require,module,exports){
|
|
15148
15659
|
'use strict';
|
|
15149
15660
|
var __extends = (this && this.__extends) || (function () {
|
|
15150
15661
|
var extendStatics = function (d, b) {
|
|
@@ -15198,7 +15709,7 @@ var RemoteTrackPublicationV2 = /** @class */ (function (_super) {
|
|
|
15198
15709
|
*/
|
|
15199
15710
|
module.exports = RemoteTrackPublicationV2;
|
|
15200
15711
|
|
|
15201
|
-
},{"../remotetrackpublication":
|
|
15712
|
+
},{"../remotetrackpublication":63}],82:[function(require,module,exports){
|
|
15202
15713
|
/* eslint callback-return:0 */
|
|
15203
15714
|
'use strict';
|
|
15204
15715
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -15349,7 +15860,7 @@ var RenderHintsSignaling = /** @class */ (function (_super) {
|
|
|
15349
15860
|
}(MediaSignaling));
|
|
15350
15861
|
module.exports = RenderHintsSignaling;
|
|
15351
15862
|
|
|
15352
|
-
},{"../../util":
|
|
15863
|
+
},{"../../util":130,"../../util/timeout":144,"./mediasignaling":73}],83:[function(require,module,exports){
|
|
15353
15864
|
/* eslint-disable no-console */
|
|
15354
15865
|
'use strict';
|
|
15355
15866
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -15421,6 +15932,13 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15421
15932
|
statsPublishIntervalMs: STATS_PUBLISH_INTERVAL_MS
|
|
15422
15933
|
}, options);
|
|
15423
15934
|
localParticipant.setBandwidthProfile(options.bandwidthProfile);
|
|
15935
|
+
var _a = initialState.options, signalingRegion = _a.signaling_region, _b = _a.audio_processors, audioProcessors = _b === void 0 ? [] : _b;
|
|
15936
|
+
localParticipant.setSignalingRegion(signalingRegion);
|
|
15937
|
+
if (audioProcessors.includes('krisp')) {
|
|
15938
|
+
// Note(mpatwardhan): we add rnnoise as allowed_processor to enable testing our pipeline e2e.
|
|
15939
|
+
audioProcessors.push('rnnoise');
|
|
15940
|
+
}
|
|
15941
|
+
localParticipant.setAudioProcessors(audioProcessors);
|
|
15424
15942
|
peerConnectionManager.setIceReconnectTimeout(options.sessionTimeout);
|
|
15425
15943
|
_this = _super.call(this, localParticipant, initialState.sid, initialState.name, options) || this;
|
|
15426
15944
|
var getTrackReceiver = function (id) { return _this._getTrackReceiver(id); };
|
|
@@ -15512,7 +16030,7 @@ var RoomV2 = /** @class */ (function (_super) {
|
|
|
15512
16030
|
periodicallyPublishStats(_this, transport, options.statsPublishIntervalMs);
|
|
15513
16031
|
_this._update(initialState);
|
|
15514
16032
|
// 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
|
|
16033
|
+
// if they are not enabled. we need to undo simulcast that was enabled with initial offer.
|
|
15516
16034
|
_this._peerConnectionManager.setEffectiveAdaptiveSimulcast(_this._publisherHintsSignaling.isSetup);
|
|
15517
16035
|
return _this;
|
|
15518
16036
|
}
|
|
@@ -16200,7 +16718,7 @@ function replaceNullsWithDefaults(activeIceCandidatePair, peerConnectionId) {
|
|
|
16200
16718
|
}
|
|
16201
16719
|
module.exports = RoomV2;
|
|
16202
16720
|
|
|
16203
|
-
},{"../../stats/statsreport":
|
|
16721
|
+
},{"../../stats/statsreport":115,"../../util":130,"../../util/movingaveragedelta":135,"../../util/twilio-video-errors":145,"../room":64,"./dominantspeakersignaling":67,"./networkqualitymonitor":74,"./networkqualitysignaling":75,"./publisherhintsignaling.js":78,"./recording":79,"./remoteparticipant":80,"./renderhintssignaling":82,"./trackprioritysignaling":84,"./trackswitchoffsignaling":85}],84:[function(require,module,exports){
|
|
16204
16722
|
'use strict';
|
|
16205
16723
|
var __extends = (this && this.__extends) || (function () {
|
|
16206
16724
|
var extendStatics = function (d, b) {
|
|
@@ -16266,7 +16784,7 @@ var TrackPrioritySignaling = /** @class */ (function (_super) {
|
|
|
16266
16784
|
}(MediaSignaling));
|
|
16267
16785
|
module.exports = TrackPrioritySignaling;
|
|
16268
16786
|
|
|
16269
|
-
},{"./mediasignaling":
|
|
16787
|
+
},{"./mediasignaling":73}],85:[function(require,module,exports){
|
|
16270
16788
|
'use strict';
|
|
16271
16789
|
var __extends = (this && this.__extends) || (function () {
|
|
16272
16790
|
var extendStatics = function (d, b) {
|
|
@@ -16324,7 +16842,7 @@ var TrackSwitchOffSignaling = /** @class */ (function (_super) {
|
|
|
16324
16842
|
*/
|
|
16325
16843
|
module.exports = TrackSwitchOffSignaling;
|
|
16326
16844
|
|
|
16327
|
-
},{"./mediasignaling":
|
|
16845
|
+
},{"./mediasignaling":73}],86:[function(require,module,exports){
|
|
16328
16846
|
'use strict';
|
|
16329
16847
|
var __extends = (this && this.__extends) || (function () {
|
|
16330
16848
|
var extendStatics = function (d, b) {
|
|
@@ -16911,7 +17429,7 @@ function setupTransport(transport) {
|
|
|
16911
17429
|
}
|
|
16912
17430
|
module.exports = TwilioConnectionTransport;
|
|
16913
17431
|
|
|
16914
|
-
},{"../../statemachine":
|
|
17432
|
+
},{"../../statemachine":87,"../../twilioconnection":119,"../../util":130,"../../util/backoff":121,"../../util/constants":124,"../../util/timeout":144,"../../util/twilio-video-errors":145}],87:[function(require,module,exports){
|
|
16915
17433
|
'use strict';
|
|
16916
17434
|
var __extends = (this && this.__extends) || (function () {
|
|
16917
17435
|
var extendStatics = function (d, b) {
|
|
@@ -17357,7 +17875,7 @@ function createUnreachableError(here, there) {
|
|
|
17357
17875
|
}
|
|
17358
17876
|
module.exports = StateMachine;
|
|
17359
17877
|
|
|
17360
|
-
},{"./util":
|
|
17878
|
+
},{"./util":130,"events":173}],88:[function(require,module,exports){
|
|
17361
17879
|
/* eslint no-undefined:0 */
|
|
17362
17880
|
'use strict';
|
|
17363
17881
|
/**
|
|
@@ -17370,7 +17888,7 @@ function average(xs) {
|
|
|
17370
17888
|
}
|
|
17371
17889
|
module.exports = average;
|
|
17372
17890
|
|
|
17373
|
-
},{}],
|
|
17891
|
+
},{}],89:[function(require,module,exports){
|
|
17374
17892
|
'use strict';
|
|
17375
17893
|
/**
|
|
17376
17894
|
* @property {number} [availableSend] - bps (undefined in Firefox)
|
|
@@ -17428,7 +17946,7 @@ var IceReport = /** @class */ (function () {
|
|
|
17428
17946
|
}());
|
|
17429
17947
|
module.exports = IceReport;
|
|
17430
17948
|
|
|
17431
|
-
},{}],
|
|
17949
|
+
},{}],90:[function(require,module,exports){
|
|
17432
17950
|
'use strict';
|
|
17433
17951
|
var IceReport = require('./icereport');
|
|
17434
17952
|
/**
|
|
@@ -17473,7 +17991,7 @@ var IceReportFactory = /** @class */ (function () {
|
|
|
17473
17991
|
}());
|
|
17474
17992
|
module.exports = IceReportFactory;
|
|
17475
17993
|
|
|
17476
|
-
},{"./icereport":
|
|
17994
|
+
},{"./icereport":89}],91:[function(require,module,exports){
|
|
17477
17995
|
'use strict';
|
|
17478
17996
|
var __extends = (this && this.__extends) || (function () {
|
|
17479
17997
|
var extendStatics = function (d, b) {
|
|
@@ -17531,7 +18049,7 @@ var LocalAudioTrackStats = /** @class */ (function (_super) {
|
|
|
17531
18049
|
*/
|
|
17532
18050
|
module.exports = LocalAudioTrackStats;
|
|
17533
18051
|
|
|
17534
|
-
},{"./localtrackstats":
|
|
18052
|
+
},{"./localtrackstats":92}],92:[function(require,module,exports){
|
|
17535
18053
|
'use strict';
|
|
17536
18054
|
var __extends = (this && this.__extends) || (function () {
|
|
17537
18055
|
var extendStatics = function (d, b) {
|
|
@@ -17591,7 +18109,7 @@ var LocalTrackStats = /** @class */ (function (_super) {
|
|
|
17591
18109
|
}(TrackStats));
|
|
17592
18110
|
module.exports = LocalTrackStats;
|
|
17593
18111
|
|
|
17594
|
-
},{"./trackstats":
|
|
18112
|
+
},{"./trackstats":117}],93:[function(require,module,exports){
|
|
17595
18113
|
'use strict';
|
|
17596
18114
|
var __extends = (this && this.__extends) || (function () {
|
|
17597
18115
|
var extendStatics = function (d, b) {
|
|
@@ -17684,7 +18202,7 @@ var LocalVideoTrackStats = /** @class */ (function (_super) {
|
|
|
17684
18202
|
}(LocalTrackStats));
|
|
17685
18203
|
module.exports = LocalVideoTrackStats;
|
|
17686
18204
|
|
|
17687
|
-
},{"./localtrackstats":
|
|
18205
|
+
},{"./localtrackstats":92}],94:[function(require,module,exports){
|
|
17688
18206
|
'use strict';
|
|
17689
18207
|
var __extends = (this && this.__extends) || (function () {
|
|
17690
18208
|
var extendStatics = function (d, b) {
|
|
@@ -17718,7 +18236,7 @@ var NetworkQualityAudioStats = /** @class */ (function (_super) {
|
|
|
17718
18236
|
}(NetworkQualityMediaStats));
|
|
17719
18237
|
module.exports = NetworkQualityAudioStats;
|
|
17720
18238
|
|
|
17721
|
-
},{"./networkqualitymediastats":
|
|
18239
|
+
},{"./networkqualitymediastats":98}],95:[function(require,module,exports){
|
|
17722
18240
|
'use strict';
|
|
17723
18241
|
/**
|
|
17724
18242
|
* Bandwidth network quality statistics.
|
|
@@ -17752,7 +18270,7 @@ var NetworkQualityBandwidthStats = /** @class */ (function () {
|
|
|
17752
18270
|
}());
|
|
17753
18271
|
module.exports = NetworkQualityBandwidthStats;
|
|
17754
18272
|
|
|
17755
|
-
},{}],
|
|
18273
|
+
},{}],96:[function(require,module,exports){
|
|
17756
18274
|
'use strict';
|
|
17757
18275
|
/**
|
|
17758
18276
|
* Fraction lost network quality statistics.
|
|
@@ -17781,7 +18299,7 @@ var NetworkQualityFractionLostStats = /** @class */ (function () {
|
|
|
17781
18299
|
}());
|
|
17782
18300
|
module.exports = NetworkQualityFractionLostStats;
|
|
17783
18301
|
|
|
17784
|
-
},{}],
|
|
18302
|
+
},{}],97:[function(require,module,exports){
|
|
17785
18303
|
'use strict';
|
|
17786
18304
|
/**
|
|
17787
18305
|
* Latency network quality statistics.
|
|
@@ -17815,7 +18333,7 @@ var NetworkQualityLatencyStats = /** @class */ (function () {
|
|
|
17815
18333
|
}());
|
|
17816
18334
|
module.exports = NetworkQualityLatencyStats;
|
|
17817
18335
|
|
|
17818
|
-
},{}],
|
|
18336
|
+
},{}],98:[function(require,module,exports){
|
|
17819
18337
|
'use strict';
|
|
17820
18338
|
var NetworkQualitySendStats = require('./networkqualitysendstats');
|
|
17821
18339
|
var NetworkQualityRecvStats = require('./networkqualityrecvstats');
|
|
@@ -17862,7 +18380,7 @@ var NetworkQualityMediaStats = /** @class */ (function () {
|
|
|
17862
18380
|
}());
|
|
17863
18381
|
module.exports = NetworkQualityMediaStats;
|
|
17864
18382
|
|
|
17865
|
-
},{"./networkqualityrecvstats":
|
|
18383
|
+
},{"./networkqualityrecvstats":99,"./networkqualitysendstats":101}],99:[function(require,module,exports){
|
|
17866
18384
|
'use strict';
|
|
17867
18385
|
var __extends = (this && this.__extends) || (function () {
|
|
17868
18386
|
var extendStatics = function (d, b) {
|
|
@@ -17897,7 +18415,7 @@ var NetworkQualityRecvStats = /** @class */ (function (_super) {
|
|
|
17897
18415
|
}(NetworkQualitySendOrRecvStats));
|
|
17898
18416
|
module.exports = NetworkQualityRecvStats;
|
|
17899
18417
|
|
|
17900
|
-
},{"./networkqualitysendorrecvstats":
|
|
18418
|
+
},{"./networkqualitysendorrecvstats":100}],100:[function(require,module,exports){
|
|
17901
18419
|
'use strict';
|
|
17902
18420
|
var NetworkQualityBandwidthStats = require('./networkqualitybandwidthstats');
|
|
17903
18421
|
var NetworkQualityFractionLostStats = require('./networkqualityfractionloststats');
|
|
@@ -17937,7 +18455,7 @@ var NetworkQualitySendOrRecvStats = /** @class */ (function () {
|
|
|
17937
18455
|
}());
|
|
17938
18456
|
module.exports = NetworkQualitySendOrRecvStats;
|
|
17939
18457
|
|
|
17940
|
-
},{"./networkqualitybandwidthstats":
|
|
18458
|
+
},{"./networkqualitybandwidthstats":95,"./networkqualityfractionloststats":96,"./networkqualitylatencystats":97}],101:[function(require,module,exports){
|
|
17941
18459
|
'use strict';
|
|
17942
18460
|
var __extends = (this && this.__extends) || (function () {
|
|
17943
18461
|
var extendStatics = function (d, b) {
|
|
@@ -17972,7 +18490,7 @@ var NetworkQualitySendStats = /** @class */ (function (_super) {
|
|
|
17972
18490
|
}(NetworkQualitySendOrRecvStats));
|
|
17973
18491
|
module.exports = NetworkQualitySendStats;
|
|
17974
18492
|
|
|
17975
|
-
},{"./networkqualitysendorrecvstats":
|
|
18493
|
+
},{"./networkqualitysendorrecvstats":100}],102:[function(require,module,exports){
|
|
17976
18494
|
'use strict';
|
|
17977
18495
|
var NetworkQualityAudioStats = require('./networkqualityaudiostats');
|
|
17978
18496
|
var NetworkQualityVideoStats = require('./networkqualityvideostats');
|
|
@@ -18012,7 +18530,7 @@ var NetworkQualityStats = /** @class */ (function () {
|
|
|
18012
18530
|
}());
|
|
18013
18531
|
module.exports = NetworkQualityStats;
|
|
18014
18532
|
|
|
18015
|
-
},{"./networkqualityaudiostats":
|
|
18533
|
+
},{"./networkqualityaudiostats":94,"./networkqualityvideostats":103}],103:[function(require,module,exports){
|
|
18016
18534
|
'use strict';
|
|
18017
18535
|
var __extends = (this && this.__extends) || (function () {
|
|
18018
18536
|
var extendStatics = function (d, b) {
|
|
@@ -18046,7 +18564,7 @@ var NetworkQualityVideoStats = /** @class */ (function (_super) {
|
|
|
18046
18564
|
}(NetworkQualityMediaStats));
|
|
18047
18565
|
module.exports = NetworkQualityVideoStats;
|
|
18048
18566
|
|
|
18049
|
-
},{"./networkqualitymediastats":
|
|
18567
|
+
},{"./networkqualitymediastats":98}],104:[function(require,module,exports){
|
|
18050
18568
|
'use strict';
|
|
18051
18569
|
var ReceiverReport = require('./receiverreport');
|
|
18052
18570
|
var SenderReport = require('./senderreport');
|
|
@@ -18124,7 +18642,7 @@ var PeerConnectionReport = /** @class */ (function () {
|
|
|
18124
18642
|
}());
|
|
18125
18643
|
module.exports = PeerConnectionReport;
|
|
18126
18644
|
|
|
18127
|
-
},{"./receiverreport":
|
|
18645
|
+
},{"./receiverreport":106,"./senderreport":113}],105:[function(require,module,exports){
|
|
18128
18646
|
'use strict';
|
|
18129
18647
|
var __read = (this && this.__read) || function (o, n) {
|
|
18130
18648
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -18554,7 +19072,7 @@ function updateChrome(factory) {
|
|
|
18554
19072
|
}
|
|
18555
19073
|
module.exports = PeerConnectionReportFactory;
|
|
18556
19074
|
|
|
18557
|
-
},{"../webrtc/util":
|
|
19075
|
+
},{"../webrtc/util":170,"./icereportfactory":90,"./peerconnectionreport":104,"./receiverreportfactory":107,"./senderreportfactory":114}],106:[function(require,module,exports){
|
|
18558
19076
|
'use strict';
|
|
18559
19077
|
var __extends = (this && this.__extends) || (function () {
|
|
18560
19078
|
var extendStatics = function (d, b) {
|
|
@@ -18680,7 +19198,7 @@ var ReceiverReport = /** @class */ (function (_super) {
|
|
|
18680
19198
|
}(SenderOrReceiverReport));
|
|
18681
19199
|
module.exports = ReceiverReport;
|
|
18682
19200
|
|
|
18683
|
-
},{"./average":
|
|
19201
|
+
},{"./average":88,"./senderorreceiverreport":111,"./sum":116}],107:[function(require,module,exports){
|
|
18684
19202
|
'use strict';
|
|
18685
19203
|
var __extends = (this && this.__extends) || (function () {
|
|
18686
19204
|
var extendStatics = function (d, b) {
|
|
@@ -18739,7 +19257,7 @@ var ReceiverReportFactory = /** @class */ (function (_super) {
|
|
|
18739
19257
|
}(SenderOrReceiverReportFactory));
|
|
18740
19258
|
module.exports = ReceiverReportFactory;
|
|
18741
19259
|
|
|
18742
|
-
},{"./receiverreport":
|
|
19260
|
+
},{"./receiverreport":106,"./senderorreceiverreportfactory":112}],108:[function(require,module,exports){
|
|
18743
19261
|
'use strict';
|
|
18744
19262
|
var __extends = (this && this.__extends) || (function () {
|
|
18745
19263
|
var extendStatics = function (d, b) {
|
|
@@ -18791,7 +19309,7 @@ var RemoteAudioTrackStats = /** @class */ (function (_super) {
|
|
|
18791
19309
|
}(RemoteTrackStats));
|
|
18792
19310
|
module.exports = RemoteAudioTrackStats;
|
|
18793
19311
|
|
|
18794
|
-
},{"./remotetrackstats":
|
|
19312
|
+
},{"./remotetrackstats":109}],109:[function(require,module,exports){
|
|
18795
19313
|
'use strict';
|
|
18796
19314
|
var __extends = (this && this.__extends) || (function () {
|
|
18797
19315
|
var extendStatics = function (d, b) {
|
|
@@ -18843,7 +19361,7 @@ var RemoteTrackStats = /** @class */ (function (_super) {
|
|
|
18843
19361
|
}(TrackStats));
|
|
18844
19362
|
module.exports = RemoteTrackStats;
|
|
18845
19363
|
|
|
18846
|
-
},{"./trackstats":
|
|
19364
|
+
},{"./trackstats":117}],110:[function(require,module,exports){
|
|
18847
19365
|
'use strict';
|
|
18848
19366
|
var __extends = (this && this.__extends) || (function () {
|
|
18849
19367
|
var extendStatics = function (d, b) {
|
|
@@ -18908,7 +19426,7 @@ var RemoteVideoTrackStats = /** @class */ (function (_super) {
|
|
|
18908
19426
|
}(RemoteTrackStats));
|
|
18909
19427
|
module.exports = RemoteVideoTrackStats;
|
|
18910
19428
|
|
|
18911
|
-
},{"./remotetrackstats":
|
|
19429
|
+
},{"./remotetrackstats":109}],111:[function(require,module,exports){
|
|
18912
19430
|
'use strict';
|
|
18913
19431
|
/**
|
|
18914
19432
|
* @property {StatsId} id
|
|
@@ -18942,7 +19460,7 @@ var SenderOrReceiverReport = /** @class */ (function () {
|
|
|
18942
19460
|
}());
|
|
18943
19461
|
module.exports = SenderOrReceiverReport;
|
|
18944
19462
|
|
|
18945
|
-
},{}],
|
|
19463
|
+
},{}],112:[function(require,module,exports){
|
|
18946
19464
|
'use strict';
|
|
18947
19465
|
/**
|
|
18948
19466
|
* @property {StatsId} id
|
|
@@ -18978,7 +19496,7 @@ var SenderOrReceiverReportFactory = /** @class */ (function () {
|
|
|
18978
19496
|
}());
|
|
18979
19497
|
module.exports = SenderOrReceiverReportFactory;
|
|
18980
19498
|
|
|
18981
|
-
},{}],
|
|
19499
|
+
},{}],113:[function(require,module,exports){
|
|
18982
19500
|
/* eslint no-undefined:0 */
|
|
18983
19501
|
'use strict';
|
|
18984
19502
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -19066,7 +19584,7 @@ var SenderReport = /** @class */ (function (_super) {
|
|
|
19066
19584
|
}(SenderOrReceiverReport));
|
|
19067
19585
|
module.exports = SenderReport;
|
|
19068
19586
|
|
|
19069
|
-
},{"./average":
|
|
19587
|
+
},{"./average":88,"./senderorreceiverreport":111,"./sum":116}],114:[function(require,module,exports){
|
|
19070
19588
|
'use strict';
|
|
19071
19589
|
var __extends = (this && this.__extends) || (function () {
|
|
19072
19590
|
var extendStatics = function (d, b) {
|
|
@@ -19125,7 +19643,7 @@ var SenderReportFactory = /** @class */ (function (_super) {
|
|
|
19125
19643
|
}(SenderOrReceiverReportFactory));
|
|
19126
19644
|
module.exports = SenderReportFactory;
|
|
19127
19645
|
|
|
19128
|
-
},{"./senderorreceiverreportfactory":
|
|
19646
|
+
},{"./senderorreceiverreportfactory":112,"./senderreport":113}],115:[function(require,module,exports){
|
|
19129
19647
|
'use strict';
|
|
19130
19648
|
var LocalAudioTrackStats = require('./localaudiotrackstats');
|
|
19131
19649
|
var LocalVideoTrackStats = require('./localvideotrackstats');
|
|
@@ -19176,7 +19694,7 @@ var StatsReport = /** @class */ (function () {
|
|
|
19176
19694
|
}());
|
|
19177
19695
|
module.exports = StatsReport;
|
|
19178
19696
|
|
|
19179
|
-
},{"./localaudiotrackstats":
|
|
19697
|
+
},{"./localaudiotrackstats":91,"./localvideotrackstats":93,"./remoteaudiotrackstats":108,"./remotevideotrackstats":110}],116:[function(require,module,exports){
|
|
19180
19698
|
'use strict';
|
|
19181
19699
|
/**
|
|
19182
19700
|
* @param {Array<number|undefined>} xs
|
|
@@ -19187,7 +19705,7 @@ function sum(xs) {
|
|
|
19187
19705
|
}
|
|
19188
19706
|
module.exports = sum;
|
|
19189
19707
|
|
|
19190
|
-
},{}],
|
|
19708
|
+
},{}],117:[function(require,module,exports){
|
|
19191
19709
|
'use strict';
|
|
19192
19710
|
/**
|
|
19193
19711
|
* Statistics for a {@link Track}.
|
|
@@ -19246,7 +19764,7 @@ var TrackStats = /** @class */ (function () {
|
|
|
19246
19764
|
}());
|
|
19247
19765
|
module.exports = TrackStats;
|
|
19248
19766
|
|
|
19249
|
-
},{}],
|
|
19767
|
+
},{}],118:[function(require,module,exports){
|
|
19250
19768
|
'use strict';
|
|
19251
19769
|
var __extends = (this && this.__extends) || (function () {
|
|
19252
19770
|
var extendStatics = function (d, b) {
|
|
@@ -19308,7 +19826,7 @@ var TrackTransceiver = /** @class */ (function (_super) {
|
|
|
19308
19826
|
*/
|
|
19309
19827
|
module.exports = TrackTransceiver;
|
|
19310
19828
|
|
|
19311
|
-
},{"events":
|
|
19829
|
+
},{"events":173}],119:[function(require,module,exports){
|
|
19312
19830
|
'use strict';
|
|
19313
19831
|
var __extends = (this && this.__extends) || (function () {
|
|
19314
19832
|
var extendStatics = function (d, b) {
|
|
@@ -19961,7 +20479,7 @@ TwilioConnection.CloseReason = CloseReason;
|
|
|
19961
20479
|
*/
|
|
19962
20480
|
module.exports = TwilioConnection;
|
|
19963
20481
|
|
|
19964
|
-
},{"./statemachine":
|
|
20482
|
+
},{"./statemachine":87,"./util":130,"./util/log":134,"./util/networkmonitor":136,"./util/timeout":144,"ws":175}],120:[function(require,module,exports){
|
|
19965
20483
|
'use strict';
|
|
19966
20484
|
var defer = require('./').defer;
|
|
19967
20485
|
/**
|
|
@@ -20026,7 +20544,7 @@ var AsyncVar = /** @class */ (function () {
|
|
|
20026
20544
|
}());
|
|
20027
20545
|
module.exports = AsyncVar;
|
|
20028
20546
|
|
|
20029
|
-
},{"./":
|
|
20547
|
+
},{"./":130}],121:[function(require,module,exports){
|
|
20030
20548
|
/**
|
|
20031
20549
|
* Expose `Backoff`.
|
|
20032
20550
|
*/
|
|
@@ -20110,7 +20628,7 @@ var Backoff = /** @class */ (function () {
|
|
|
20110
20628
|
}());
|
|
20111
20629
|
module.exports = Backoff;
|
|
20112
20630
|
|
|
20113
|
-
},{}],
|
|
20631
|
+
},{}],122:[function(require,module,exports){
|
|
20114
20632
|
/* globals chrome, navigator */
|
|
20115
20633
|
'use strict';
|
|
20116
20634
|
var __read = (this && this.__read) || function (o, n) {
|
|
@@ -20267,7 +20785,7 @@ module.exports = {
|
|
|
20267
20785
|
rebrandedChromeBrowser: rebrandedChromeBrowser
|
|
20268
20786
|
};
|
|
20269
20787
|
|
|
20270
|
-
},{}],
|
|
20788
|
+
},{}],123:[function(require,module,exports){
|
|
20271
20789
|
'use strict';
|
|
20272
20790
|
var __read = (this && this.__read) || function (o, n) {
|
|
20273
20791
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -20410,7 +20928,7 @@ var CancelablePromise = /** @class */ (function () {
|
|
|
20410
20928
|
}());
|
|
20411
20929
|
module.exports = CancelablePromise;
|
|
20412
20930
|
|
|
20413
|
-
},{}],
|
|
20931
|
+
},{}],124:[function(require,module,exports){
|
|
20414
20932
|
'use strict';
|
|
20415
20933
|
/* eslint-disable camelcase */
|
|
20416
20934
|
var packageInfo = require('../../package.json');
|
|
@@ -20512,7 +21030,7 @@ module.exports.videoContentPreferencesMode = {
|
|
|
20512
21030
|
MODE_MANUAL: 'manual'
|
|
20513
21031
|
};
|
|
20514
21032
|
|
|
20515
|
-
},{"../../package.json":
|
|
21033
|
+
},{"../../package.json":174}],125:[function(require,module,exports){
|
|
20516
21034
|
'use strict';
|
|
20517
21035
|
var detectSilence = require('../webaudio/detectsilence');
|
|
20518
21036
|
var N_ATTEMPTS = 3;
|
|
@@ -20553,7 +21071,7 @@ function detectSilentAudio(el) {
|
|
|
20553
21071
|
}
|
|
20554
21072
|
module.exports = detectSilentAudio;
|
|
20555
21073
|
|
|
20556
|
-
},{"../webaudio/audiocontext":
|
|
21074
|
+
},{"../webaudio/audiocontext":152,"../webaudio/detectsilence":153}],126:[function(require,module,exports){
|
|
20557
21075
|
'use strict';
|
|
20558
21076
|
// Cached copy of the <canvas> used to check silent video frames.
|
|
20559
21077
|
var canvas = null;
|
|
@@ -20612,7 +21130,7 @@ function detectSilentVideo(el) {
|
|
|
20612
21130
|
}
|
|
20613
21131
|
module.exports = detectSilentVideo;
|
|
20614
21132
|
|
|
20615
|
-
},{}],
|
|
21133
|
+
},{}],127:[function(require,module,exports){
|
|
20616
21134
|
'use strict';
|
|
20617
21135
|
/**
|
|
20618
21136
|
* The {@link DocumentVisibilityMonitor} monitors the visibility state of the DOM
|
|
@@ -20734,7 +21252,7 @@ var DocumentVisibilityMonitor = /** @class */ (function () {
|
|
|
20734
21252
|
}());
|
|
20735
21253
|
module.exports = new DocumentVisibilityMonitor(2);
|
|
20736
21254
|
|
|
20737
|
-
},{}],
|
|
21255
|
+
},{}],128:[function(require,module,exports){
|
|
20738
21256
|
/* eslint-disable no-console */
|
|
20739
21257
|
'use strict';
|
|
20740
21258
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -20832,7 +21350,7 @@ var EventObserver = /** @class */ (function (_super) {
|
|
|
20832
21350
|
*/
|
|
20833
21351
|
module.exports = EventObserver;
|
|
20834
21352
|
|
|
20835
|
-
},{"events":
|
|
21353
|
+
},{"events":173}],129:[function(require,module,exports){
|
|
20836
21354
|
'use strict';
|
|
20837
21355
|
var Filter = /** @class */ (function () {
|
|
20838
21356
|
function Filter(options) {
|
|
@@ -20876,7 +21394,7 @@ var Filter = /** @class */ (function () {
|
|
|
20876
21394
|
}());
|
|
20877
21395
|
module.exports = Filter;
|
|
20878
21396
|
|
|
20879
|
-
},{}],
|
|
21397
|
+
},{}],130:[function(require,module,exports){
|
|
20880
21398
|
'use strict';
|
|
20881
21399
|
var __extends = (this && this.__extends) || (function () {
|
|
20882
21400
|
var extendStatics = function (d, b) {
|
|
@@ -21773,7 +22291,7 @@ exports.isUserMediaTrack = isUserMediaTrack;
|
|
|
21773
22291
|
exports.waitForSometime = waitForSometime;
|
|
21774
22292
|
exports.waitForEvent = waitForEvent;
|
|
21775
22293
|
|
|
21776
|
-
},{"../webrtc/util":
|
|
22294
|
+
},{"../webrtc/util":170,"./constants":124,"./sid":142,"./twiliowarning":147}],131:[function(require,module,exports){
|
|
21777
22295
|
/* eslint-disable camelcase */
|
|
21778
22296
|
'use strict';
|
|
21779
22297
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -22068,7 +22586,7 @@ function reconnect(publisher, token, sdkName, sdkVersion, roomSid, participantSi
|
|
|
22068
22586
|
*/
|
|
22069
22587
|
module.exports = InsightsPublisher;
|
|
22070
22588
|
|
|
22071
|
-
},{"..":
|
|
22589
|
+
},{"..":130,"../../util":130,"../browserdetection":122,"../constants":124,"events":173,"ws":175}],132:[function(require,module,exports){
|
|
22072
22590
|
// eslint-disable-next-line no-warning-comments
|
|
22073
22591
|
// TODO(mroberts): This should be described as implementing some
|
|
22074
22592
|
// InsightsPublisher interface.
|
|
@@ -22113,7 +22631,7 @@ var InsightsPublisher = /** @class */ (function () {
|
|
|
22113
22631
|
}());
|
|
22114
22632
|
module.exports = InsightsPublisher;
|
|
22115
22633
|
|
|
22116
|
-
},{}],
|
|
22634
|
+
},{}],133:[function(require,module,exports){
|
|
22117
22635
|
'use strict';
|
|
22118
22636
|
var defer = require('./').defer;
|
|
22119
22637
|
/**
|
|
@@ -22175,7 +22693,7 @@ var LocalMediaRestartDeferreds = /** @class */ (function () {
|
|
|
22175
22693
|
}());
|
|
22176
22694
|
module.exports = new LocalMediaRestartDeferreds();
|
|
22177
22695
|
|
|
22178
|
-
},{"./":
|
|
22696
|
+
},{"./":130}],134:[function(require,module,exports){
|
|
22179
22697
|
/* eslint new-cap:0 */
|
|
22180
22698
|
'use strict';
|
|
22181
22699
|
var __read = (this && this.__read) || function (o, n) {
|
|
@@ -22462,7 +22980,7 @@ function validateLogLevels(levels) {
|
|
|
22462
22980
|
}
|
|
22463
22981
|
module.exports = Log;
|
|
22464
22982
|
|
|
22465
|
-
},{"../vendor/loglevel":
|
|
22983
|
+
},{"../vendor/loglevel":151,"./constants":124}],135:[function(require,module,exports){
|
|
22466
22984
|
'use strict';
|
|
22467
22985
|
/**
|
|
22468
22986
|
* Calculates the moving average delta for the given pair ofsamples. A sample (S)
|
|
@@ -22509,7 +23027,7 @@ var MovingAverageDelta = /** @class */ (function () {
|
|
|
22509
23027
|
}());
|
|
22510
23028
|
module.exports = MovingAverageDelta;
|
|
22511
23029
|
|
|
22512
|
-
},{}],
|
|
23030
|
+
},{}],136:[function(require,module,exports){
|
|
22513
23031
|
'use strict';
|
|
22514
23032
|
/**
|
|
22515
23033
|
* Monitor the network connection status to detect interruptions and handoffs.
|
|
@@ -22598,7 +23116,7 @@ var NetworkMonitor = /** @class */ (function () {
|
|
|
22598
23116
|
}());
|
|
22599
23117
|
module.exports = NetworkMonitor;
|
|
22600
23118
|
|
|
22601
|
-
},{}],
|
|
23119
|
+
},{}],137:[function(require,module,exports){
|
|
22602
23120
|
/* eslint-disable no-console */
|
|
22603
23121
|
'use strict';
|
|
22604
23122
|
var __extends = (this && this.__extends) || (function () {
|
|
@@ -22661,7 +23179,7 @@ var NullResizeObserver = /** @class */ (function (_super) {
|
|
|
22661
23179
|
}(NullObserver));
|
|
22662
23180
|
module.exports = { NullIntersectionObserver: NullIntersectionObserver, NullResizeObserver: NullResizeObserver, NullObserver: NullObserver };
|
|
22663
23181
|
|
|
22664
|
-
},{}],
|
|
23182
|
+
},{}],138:[function(require,module,exports){
|
|
22665
23183
|
'use strict';
|
|
22666
23184
|
var __read = (this && this.__read) || function (o, n) {
|
|
22667
23185
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -23199,7 +23717,7 @@ exports.revertSimulcast = revertSimulcast;
|
|
|
23199
23717
|
exports.setCodecPreferences = setCodecPreferences;
|
|
23200
23718
|
exports.setSimulcast = setSimulcast;
|
|
23201
23719
|
|
|
23202
|
-
},{"../":
|
|
23720
|
+
},{"../":130,"./simulcast":140}],139:[function(require,module,exports){
|
|
23203
23721
|
'use strict';
|
|
23204
23722
|
var RTCSessionDescription = require('../../webrtc').RTCSessionDescription;
|
|
23205
23723
|
var _a = require('./'), createPtToCodecName = _a.createPtToCodecName, getMediaSections = _a.getMediaSections;
|
|
@@ -23392,7 +23910,7 @@ function addFmtpAttributeForRtxPt(mediaSection, rtxPt, pt) {
|
|
|
23392
23910
|
}
|
|
23393
23911
|
module.exports = workaround;
|
|
23394
23912
|
|
|
23395
|
-
},{"../../webrtc":
|
|
23913
|
+
},{"../../webrtc":157,"./":138}],140:[function(require,module,exports){
|
|
23396
23914
|
'use strict';
|
|
23397
23915
|
var __read = (this && this.__read) || function (o, n) {
|
|
23398
23916
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -23655,7 +24173,7 @@ function setSimulcastInMediaSection(section, trackIdsToAttributes) {
|
|
|
23655
24173
|
*/
|
|
23656
24174
|
module.exports = setSimulcastInMediaSection;
|
|
23657
24175
|
|
|
23658
|
-
},{"../":
|
|
24176
|
+
},{"../":130}],141:[function(require,module,exports){
|
|
23659
24177
|
'use strict';
|
|
23660
24178
|
var getMediaSections = require('./').getMediaSections;
|
|
23661
24179
|
/**
|
|
@@ -23700,7 +24218,7 @@ var TrackMatcher = /** @class */ (function () {
|
|
|
23700
24218
|
}());
|
|
23701
24219
|
module.exports = TrackMatcher;
|
|
23702
24220
|
|
|
23703
|
-
},{"./":
|
|
24221
|
+
},{"./":138}],142:[function(require,module,exports){
|
|
23704
24222
|
var SID_CHARS = '1234567890abcdef';
|
|
23705
24223
|
var SID_CHAR_LENGTH = 32;
|
|
23706
24224
|
// copied from: https://code.hq.twilio.com/flex/monkey/blob/0fdce2b6c52d6be0b17a5cdb92f0c54f119b8ea8/src/client/lib/sid.ts#L39
|
|
@@ -23719,7 +24237,7 @@ function createSID(prefix) {
|
|
|
23719
24237
|
exports.sessionSID = createSID('SS');
|
|
23720
24238
|
exports.createSID = createSID;
|
|
23721
24239
|
|
|
23722
|
-
},{}],
|
|
24240
|
+
},{}],143:[function(require,module,exports){
|
|
23723
24241
|
'use strict';
|
|
23724
24242
|
var _a = require('../webrtc/util'), guessBrowser = _a.guessBrowser, isWebRTCSupported = _a.support;
|
|
23725
24243
|
var getSdpFormat = require('../webrtc/util/sdp').getSdpFormat;
|
|
@@ -23766,7 +24284,7 @@ function isSupported() {
|
|
|
23766
24284
|
}
|
|
23767
24285
|
module.exports = isSupported;
|
|
23768
24286
|
|
|
23769
|
-
},{"../webrtc/util":
|
|
24287
|
+
},{"../webrtc/util":170,"../webrtc/util/sdp":172,"./browserdetection":122}],144:[function(require,module,exports){
|
|
23770
24288
|
'use strict';
|
|
23771
24289
|
/**
|
|
23772
24290
|
* A {@link Timeout} represents a resettable and clearable timeout.
|
|
@@ -23861,7 +24379,7 @@ var Timeout = /** @class */ (function () {
|
|
|
23861
24379
|
}());
|
|
23862
24380
|
module.exports = Timeout;
|
|
23863
24381
|
|
|
23864
|
-
},{}],
|
|
24382
|
+
},{}],145:[function(require,module,exports){
|
|
23865
24383
|
// NOTE: Do not edit this file. This code is auto-generated. Contact the
|
|
23866
24384
|
// Twilio SDK Team for more information.
|
|
23867
24385
|
'use strict';
|
|
@@ -24885,7 +25403,7 @@ var ConfigurationAcquireTurnFailedError = /** @class */ (function (_super) {
|
|
|
24885
25403
|
exports.ConfigurationAcquireTurnFailedError = ConfigurationAcquireTurnFailedError;
|
|
24886
25404
|
Object.defineProperty(TwilioErrorByCode, 53501, { value: ConfigurationAcquireTurnFailedError });
|
|
24887
25405
|
|
|
24888
|
-
},{"./twilioerror":
|
|
25406
|
+
},{"./twilioerror":146}],146:[function(require,module,exports){
|
|
24889
25407
|
'use strict';
|
|
24890
25408
|
var __extends = (this && this.__extends) || (function () {
|
|
24891
25409
|
var extendStatics = function (d, b) {
|
|
@@ -24967,7 +25485,7 @@ var TwilioError = /** @class */ (function (_super) {
|
|
|
24967
25485
|
}(Error));
|
|
24968
25486
|
module.exports = TwilioError;
|
|
24969
25487
|
|
|
24970
|
-
},{}],
|
|
25488
|
+
},{}],147:[function(require,module,exports){
|
|
24971
25489
|
'use strict';
|
|
24972
25490
|
/**
|
|
24973
25491
|
* @private
|
|
@@ -24980,7 +25498,7 @@ var TwilioWarning = {
|
|
|
24980
25498
|
};
|
|
24981
25499
|
module.exports = TwilioWarning;
|
|
24982
25500
|
|
|
24983
|
-
},{}],
|
|
25501
|
+
},{}],148:[function(require,module,exports){
|
|
24984
25502
|
'use strict';
|
|
24985
25503
|
var isNonArrayObject = require('./').isNonArrayObject;
|
|
24986
25504
|
var _a = require('./constants'), E = _a.typeErrors, clientTrackSwitchOffControl = _a.clientTrackSwitchOffControl, videoContentPreferencesMode = _a.videoContentPreferencesMode, subscriptionMode = _a.subscriptionMode, trackPriority = _a.trackPriority, trackSwitchOffMode = _a.trackSwitchOffMode;
|
|
@@ -25097,7 +25615,52 @@ exports.validateBandwidthProfile = validateBandwidthProfile;
|
|
|
25097
25615
|
exports.validateLocalTrack = validateLocalTrack;
|
|
25098
25616
|
exports.validateObject = validateObject;
|
|
25099
25617
|
|
|
25100
|
-
},{"./":
|
|
25618
|
+
},{"./":130,"./constants":124}],149:[function(require,module,exports){
|
|
25619
|
+
/**
|
|
25620
|
+
* Copyright (c) 2018 uupaa and 2019 Google LLC
|
|
25621
|
+
* Licensed under the MIT license.
|
|
25622
|
+
*
|
|
25623
|
+
* Copied from https://github.com/GoogleChromeLabs/dynamic-import-polyfill
|
|
25624
|
+
*/
|
|
25625
|
+
module.exports = (function (scope) {
|
|
25626
|
+
var document = scope.document, location = scope.location, Blob = scope.Blob, URL = scope.URL;
|
|
25627
|
+
if ([document, location, Blob, URL].some(function (api) { return !api; })) {
|
|
25628
|
+
return function dynamicImportNotSupported(module) {
|
|
25629
|
+
return Promise.reject(new Error("Failed to import: " + module + ": dynamicImport is not supported"));
|
|
25630
|
+
};
|
|
25631
|
+
}
|
|
25632
|
+
var cleanupScript = function (script) {
|
|
25633
|
+
URL.revokeObjectURL(script.src);
|
|
25634
|
+
script.remove();
|
|
25635
|
+
};
|
|
25636
|
+
scope.__twilioImportedModules = {
|
|
25637
|
+
// Imported module map.
|
|
25638
|
+
};
|
|
25639
|
+
return function dynamicImport(module) {
|
|
25640
|
+
return new Promise(function (resolve, reject) {
|
|
25641
|
+
var absURL = new URL(module, location);
|
|
25642
|
+
var moduleBlob = new Blob([
|
|
25643
|
+
"import * as m from '" + absURL + "';",
|
|
25644
|
+
"window.__twilioImportedModules['" + absURL + "']=m;"
|
|
25645
|
+
], { type: 'text/javascript' });
|
|
25646
|
+
var script = Object.assign(document.createElement('script'), {
|
|
25647
|
+
type: 'module',
|
|
25648
|
+
src: URL.createObjectURL(moduleBlob),
|
|
25649
|
+
onerror: function () {
|
|
25650
|
+
cleanupScript(script);
|
|
25651
|
+
reject(new Error("Failed to import: " + absURL));
|
|
25652
|
+
},
|
|
25653
|
+
onload: function () {
|
|
25654
|
+
cleanupScript(script);
|
|
25655
|
+
resolve(scope.__twilioImportedModules[absURL]);
|
|
25656
|
+
},
|
|
25657
|
+
});
|
|
25658
|
+
document.head.appendChild(script);
|
|
25659
|
+
});
|
|
25660
|
+
};
|
|
25661
|
+
}(globalThis));
|
|
25662
|
+
|
|
25663
|
+
},{}],150:[function(require,module,exports){
|
|
25101
25664
|
/**
|
|
25102
25665
|
* Copyright (c) 2011-2022 Isaac Z. Schlueter
|
|
25103
25666
|
* Licensed under the ISC License.
|
|
@@ -25132,7 +25695,7 @@ module.exports = function inherits(ctor, superCtor) {
|
|
|
25132
25695
|
}
|
|
25133
25696
|
};
|
|
25134
25697
|
|
|
25135
|
-
},{}],
|
|
25698
|
+
},{}],151:[function(require,module,exports){
|
|
25136
25699
|
/**
|
|
25137
25700
|
* Copyright (c) 2013 Tim Perry
|
|
25138
25701
|
* Licensed under the MIT license.
|
|
@@ -25372,7 +25935,7 @@ defaultLogger.getLoggers = function getLoggers() {
|
|
|
25372
25935
|
defaultLogger['default'] = defaultLogger;
|
|
25373
25936
|
module.exports = defaultLogger;
|
|
25374
25937
|
|
|
25375
|
-
},{}],
|
|
25938
|
+
},{}],152:[function(require,module,exports){
|
|
25376
25939
|
/* globals webkitAudioContext, AudioContext */
|
|
25377
25940
|
'use strict';
|
|
25378
25941
|
var NativeAudioContext = typeof AudioContext !== 'undefined'
|
|
@@ -25455,7 +26018,7 @@ var AudioContextFactory = /** @class */ (function () {
|
|
|
25455
26018
|
}());
|
|
25456
26019
|
module.exports = new AudioContextFactory();
|
|
25457
26020
|
|
|
25458
|
-
},{}],
|
|
26021
|
+
},{}],153:[function(require,module,exports){
|
|
25459
26022
|
'use strict';
|
|
25460
26023
|
/**
|
|
25461
26024
|
* Return a Promise that resolves after `timeout` milliseconds.
|
|
@@ -25508,7 +26071,7 @@ function detectSilence(audioContext, stream, timeout) {
|
|
|
25508
26071
|
}
|
|
25509
26072
|
module.exports = detectSilence;
|
|
25510
26073
|
|
|
25511
|
-
},{}],
|
|
26074
|
+
},{}],154:[function(require,module,exports){
|
|
25512
26075
|
'use strict';
|
|
25513
26076
|
var detectSilence = require('./detectsilence');
|
|
25514
26077
|
/**
|
|
@@ -25578,7 +26141,7 @@ to get a new one, but we\'ve run out of retries; returning it anyway.');
|
|
|
25578
26141
|
}
|
|
25579
26142
|
module.exports = workaround;
|
|
25580
26143
|
|
|
25581
|
-
},{"./audiocontext":
|
|
26144
|
+
},{"./audiocontext":152,"./detectsilence":153}],155:[function(require,module,exports){
|
|
25582
26145
|
'use strict';
|
|
25583
26146
|
var flatMap = require('./util').flatMap;
|
|
25584
26147
|
var guessBrowser = require('./util').guessBrowser;
|
|
@@ -26372,7 +26935,7 @@ function standardizeFirefoxStats(response, isRemote) {
|
|
|
26372
26935
|
*/
|
|
26373
26936
|
module.exports = getStats;
|
|
26374
26937
|
|
|
26375
|
-
},{"./util":
|
|
26938
|
+
},{"./util":170,"./util/sdp":172}],156:[function(require,module,exports){
|
|
26376
26939
|
/* globals navigator */
|
|
26377
26940
|
'use strict';
|
|
26378
26941
|
/**
|
|
@@ -26396,7 +26959,7 @@ function getUserMedia(constraints) {
|
|
|
26396
26959
|
}
|
|
26397
26960
|
module.exports = getUserMedia;
|
|
26398
26961
|
|
|
26399
|
-
},{}],
|
|
26962
|
+
},{}],157:[function(require,module,exports){
|
|
26400
26963
|
'use strict';
|
|
26401
26964
|
var WebRTC = {};
|
|
26402
26965
|
Object.defineProperties(WebRTC, {
|
|
@@ -26431,7 +26994,7 @@ Object.defineProperties(WebRTC, {
|
|
|
26431
26994
|
});
|
|
26432
26995
|
module.exports = WebRTC;
|
|
26433
26996
|
|
|
26434
|
-
},{"./getstats":
|
|
26997
|
+
},{"./getstats":155,"./getusermedia":156,"./mediastream":158,"./mediastreamtrack":159,"./rtcicecandidate":160,"./rtcpeerconnection":163,"./rtcsessiondescription":168}],158:[function(require,module,exports){
|
|
26435
26998
|
/* globals MediaStream */
|
|
26436
26999
|
'use strict';
|
|
26437
27000
|
if (typeof MediaStream === 'function') {
|
|
@@ -26443,7 +27006,7 @@ else {
|
|
|
26443
27006
|
};
|
|
26444
27007
|
}
|
|
26445
27008
|
|
|
26446
|
-
},{}],
|
|
27009
|
+
},{}],159:[function(require,module,exports){
|
|
26447
27010
|
/* global MediaStreamTrack */
|
|
26448
27011
|
'use strict';
|
|
26449
27012
|
if (typeof MediaStreamTrack === 'function') {
|
|
@@ -26455,7 +27018,7 @@ else {
|
|
|
26455
27018
|
};
|
|
26456
27019
|
}
|
|
26457
27020
|
|
|
26458
|
-
},{}],
|
|
27021
|
+
},{}],160:[function(require,module,exports){
|
|
26459
27022
|
/* global RTCIceCandidate */
|
|
26460
27023
|
'use strict';
|
|
26461
27024
|
if (typeof RTCIceCandidate === 'function') {
|
|
@@ -26467,7 +27030,7 @@ else {
|
|
|
26467
27030
|
};
|
|
26468
27031
|
}
|
|
26469
27032
|
|
|
26470
|
-
},{}],
|
|
27033
|
+
},{}],161:[function(require,module,exports){
|
|
26471
27034
|
/* globals RTCDataChannel, RTCPeerConnection, RTCSessionDescription */
|
|
26472
27035
|
'use strict';
|
|
26473
27036
|
var ChromeRTCSessionDescription = require('../rtcsessiondescription/chrome');
|
|
@@ -26978,7 +27541,7 @@ function updateTrackIdsToSSRCs(sdpFormat, tracksToSSRCs, sdp) {
|
|
|
26978
27541
|
}
|
|
26979
27542
|
module.exports = ChromeRTCPeerConnection;
|
|
26980
27543
|
|
|
26981
|
-
},{"../../vendor/inherits":
|
|
27544
|
+
},{"../../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
27545
|
/* globals RTCPeerConnection */
|
|
26983
27546
|
'use strict';
|
|
26984
27547
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27273,7 +27836,7 @@ function overwriteWithInitiallyNegotiatedDtlsRole(description, dtlsRole) {
|
|
|
27273
27836
|
}
|
|
27274
27837
|
module.exports = FirefoxRTCPeerConnection;
|
|
27275
27838
|
|
|
27276
|
-
},{"../../vendor/inherits":
|
|
27839
|
+
},{"../../vendor/inherits":150,"../rtcsessiondescription/firefox":167,"../util":170,"../util/eventtarget":169,"../util/sdp":172}],163:[function(require,module,exports){
|
|
27277
27840
|
'use strict';
|
|
27278
27841
|
if (typeof RTCPeerConnection === 'function') {
|
|
27279
27842
|
var guessBrowser = require('../util').guessBrowser;
|
|
@@ -27298,7 +27861,7 @@ else {
|
|
|
27298
27861
|
};
|
|
27299
27862
|
}
|
|
27300
27863
|
|
|
27301
|
-
},{"../util":
|
|
27864
|
+
},{"../util":170,"./chrome":161,"./firefox":162,"./safari":164}],164:[function(require,module,exports){
|
|
27302
27865
|
/* globals RTCPeerConnection, RTCSessionDescription */
|
|
27303
27866
|
'use strict';
|
|
27304
27867
|
var EventTarget = require('../util/eventtarget');
|
|
@@ -27647,7 +28210,7 @@ function shimDataChannel(dataChannel) {
|
|
|
27647
28210
|
}
|
|
27648
28211
|
module.exports = SafariRTCPeerConnection;
|
|
27649
28212
|
|
|
27650
|
-
},{"../../vendor/inherits":
|
|
28213
|
+
},{"../../vendor/inherits":150,"../util":170,"../util/eventtarget":169,"../util/latch":171,"../util/sdp":172}],165:[function(require,module,exports){
|
|
27651
28214
|
'use strict';
|
|
27652
28215
|
/**
|
|
27653
28216
|
* RTCRtpSender shim.
|
|
@@ -27685,7 +28248,7 @@ function RTCRtpSenderShim(track) {
|
|
|
27685
28248
|
// using the RTCRtpSender APIs.
|
|
27686
28249
|
module.exports = RTCRtpSenderShim;
|
|
27687
28250
|
|
|
27688
|
-
},{}],
|
|
28251
|
+
},{}],166:[function(require,module,exports){
|
|
27689
28252
|
/* globals RTCSessionDescription */
|
|
27690
28253
|
'use strict';
|
|
27691
28254
|
// This class wraps Chrome's RTCSessionDescription implementation. It provides
|
|
@@ -27722,12 +28285,12 @@ function ChromeRTCSessionDescription(descriptionInitDict) {
|
|
|
27722
28285
|
}
|
|
27723
28286
|
module.exports = ChromeRTCSessionDescription;
|
|
27724
28287
|
|
|
27725
|
-
},{}],
|
|
28288
|
+
},{}],167:[function(require,module,exports){
|
|
27726
28289
|
/* globals RTCSessionDescription */
|
|
27727
28290
|
'use strict';
|
|
27728
28291
|
module.exports = RTCSessionDescription;
|
|
27729
28292
|
|
|
27730
|
-
},{}],
|
|
28293
|
+
},{}],168:[function(require,module,exports){
|
|
27731
28294
|
/* globals RTCSessionDescription */
|
|
27732
28295
|
'use strict';
|
|
27733
28296
|
if (typeof RTCSessionDescription === 'function') {
|
|
@@ -27750,7 +28313,7 @@ else {
|
|
|
27750
28313
|
};
|
|
27751
28314
|
}
|
|
27752
28315
|
|
|
27753
|
-
},{"../util":
|
|
28316
|
+
},{"../util":170,"./chrome":166,"./firefox":167}],169:[function(require,module,exports){
|
|
27754
28317
|
'use strict';
|
|
27755
28318
|
var EventEmitter = require('events').EventEmitter;
|
|
27756
28319
|
/**
|
|
@@ -27785,7 +28348,7 @@ EventTarget.prototype.removeEventListener = function removeEventListener() {
|
|
|
27785
28348
|
};
|
|
27786
28349
|
module.exports = EventTarget;
|
|
27787
28350
|
|
|
27788
|
-
},{"events":
|
|
28351
|
+
},{"events":173}],170:[function(require,module,exports){
|
|
27789
28352
|
'use strict';
|
|
27790
28353
|
/**
|
|
27791
28354
|
* Create a {@link Deferred}.
|
|
@@ -28094,7 +28657,7 @@ exports.makeUUID = makeUUID;
|
|
|
28094
28657
|
exports.proxyProperties = proxyProperties;
|
|
28095
28658
|
exports.support = support;
|
|
28096
28659
|
|
|
28097
|
-
},{}],
|
|
28660
|
+
},{}],171:[function(require,module,exports){
|
|
28098
28661
|
'use strict';
|
|
28099
28662
|
var defer = require('./').defer;
|
|
28100
28663
|
var states = {
|
|
@@ -28200,7 +28763,7 @@ function createUnreachableStateError(from, to) {
|
|
|
28200
28763
|
}
|
|
28201
28764
|
module.exports = Latch;
|
|
28202
28765
|
|
|
28203
|
-
},{"./":
|
|
28766
|
+
},{"./":170}],172:[function(require,module,exports){
|
|
28204
28767
|
/* globals RTCPeerConnection, RTCRtpTransceiver */
|
|
28205
28768
|
'use strict';
|
|
28206
28769
|
var flatMap = require('./').flatMap;
|
|
@@ -28494,7 +29057,7 @@ exports.getUnifiedPlanSSRCs = getUnifiedPlanSSRCs;
|
|
|
28494
29057
|
exports.updatePlanBTrackIdsToSSRCs = updatePlanBTrackIdsToSSRCs;
|
|
28495
29058
|
exports.updateUnifiedPlanTrackIdsToSSRCs = updateUnifiedPlanTrackIdsToSSRCs;
|
|
28496
29059
|
|
|
28497
|
-
},{"./":
|
|
29060
|
+
},{"./":170}],173:[function(require,module,exports){
|
|
28498
29061
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
28499
29062
|
//
|
|
28500
29063
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
|
@@ -28993,12 +29556,12 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
|
|
|
28993
29556
|
}
|
|
28994
29557
|
}
|
|
28995
29558
|
|
|
28996
|
-
},{}],
|
|
29559
|
+
},{}],174:[function(require,module,exports){
|
|
28997
29560
|
module.exports={
|
|
28998
29561
|
"name": "twilio-video",
|
|
28999
29562
|
"title": "Twilio Video",
|
|
29000
29563
|
"description": "Twilio Video JavaScript Library",
|
|
29001
|
-
"version": "2.
|
|
29564
|
+
"version": "2.24.1",
|
|
29002
29565
|
"homepage": "https://twilio.com",
|
|
29003
29566
|
"author": "Mark Andrus Roberts <mroberts@twilio.com>",
|
|
29004
29567
|
"contributors": [
|
|
@@ -29131,7 +29694,7 @@ module.exports={
|
|
|
29131
29694
|
"test:framework:install": "npm install chromedriver && npm install selenium-webdriver && npm install geckodriver && npm install puppeteer",
|
|
29132
29695
|
"test:framework": "npm-run-all test:framework:install test:framework:no-framework test:framework:react",
|
|
29133
29696
|
"test": "npm-run-all test:unit test:integration",
|
|
29134
|
-
"build:es5": "rimraf ./es5 && tsc tsdef/twilio-video-tests.ts --noEmit --lib es2018,dom && tsc
|
|
29697
|
+
"build:es5": "rimraf ./es5 && mkdir -p es5 && tsc tsdef/twilio-video-tests.ts --noEmit --lib es2018,dom && tsc",
|
|
29135
29698
|
"build:js": "node ./scripts/build.js ./src/twilio-video.js ./LICENSE.md ./dist/twilio-video.js",
|
|
29136
29699
|
"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
29700
|
"build": "npm-run-all clean lint docs test:unit test:integration build:es5 build:js build:min.js test:umd",
|
|
@@ -29152,7 +29715,7 @@ module.exports={
|
|
|
29152
29715
|
}
|
|
29153
29716
|
}
|
|
29154
29717
|
|
|
29155
|
-
},{}],
|
|
29718
|
+
},{}],175:[function(require,module,exports){
|
|
29156
29719
|
module.exports = WebSocket;
|
|
29157
29720
|
|
|
29158
29721
|
},{}]},{},[11]);
|