@webex/internal-media-core 2.23.2 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -1241,198 +1241,6 @@ var off$1 = (eventName, listener) => {
1241
1241
  eventEmitter.off(eventName, listener);
1242
1242
  };
1243
1243
 
1244
- var bnrProcessor = {
1245
- isModuleAdded: false,
1246
- workletProcessorUrl: 'https://models.intelligence.webex.com/bnr/1.1.0/noise-reduction-effect.worklet.js'
1247
- };
1248
- function isValidTrack(track) {
1249
- var supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
1250
- var supportedSampleRates = [16000, 32000, 48000];
1251
- if (supportedConstraints.sampleRate) {
1252
- var settings = getTrackSettings(track);
1253
- var {
1254
- sampleRate
1255
- } = settings;
1256
- if (sampleRate && !supportedSampleRates.includes(sampleRate)) {
1257
- var error = new Error("Sample rate of ".concat(sampleRate, " is not supported."));
1258
- logger$4.error({
1259
- ID: track.id,
1260
- mediaType: MEDIA_STREAM_TRACK,
1261
- action: 'isValidTrack()',
1262
- description: error.message,
1263
- error
1264
- });
1265
- throw error;
1266
- } else {
1267
- return true;
1268
- }
1269
- } else {
1270
- var _error = new Error('Not supported');
1271
- logger$4.info({
1272
- ID: track.id,
1273
- mediaType: MEDIA_STREAM_TRACK,
1274
- action: 'isValidTrack()',
1275
- description: _error.message,
1276
- error: _error
1277
- });
1278
- return true;
1279
- }
1280
- }
1281
- function loadProcessor() {
1282
- return _loadProcessor.apply(this, arguments);
1283
- }
1284
- function _loadProcessor() {
1285
- _loadProcessor = _asyncToGenerator(function* () {
1286
- logger$4.info({
1287
- mediaType: MEDIA_STREAM_TRACK,
1288
- action: 'loadProcessor()',
1289
- description: 'Creating and loading BNR module'
1290
- });
1291
- var audioContext = new AudioContext();
1292
- bnrProcessor.isModuleAdded = true;
1293
- bnrProcessor.audioContext = audioContext;
1294
- yield audioContext.audioWorklet.addModule(bnrProcessor.workletProcessorUrl);
1295
- bnrProcessor.workletNode = new AudioWorkletNode(audioContext, 'noise-reduction-worklet-processor');
1296
- return audioContext;
1297
- });
1298
- return _loadProcessor.apply(this, arguments);
1299
- }
1300
- function enableBNR(_x) {
1301
- return _enableBNR.apply(this, arguments);
1302
- }
1303
- function _enableBNR() {
1304
- _enableBNR = _asyncToGenerator(function* (track) {
1305
- logger$4.debug({
1306
- ID: track.id,
1307
- mediaType: MEDIA_STREAM_TRACK,
1308
- action: 'enableBNR()',
1309
- description: 'Called'
1310
- });
1311
- try {
1312
- isValidTrack(track);
1313
- var streamFromTrack = new MediaStream();
1314
- streamFromTrack.addTrack(track);
1315
- var workletNode;
1316
- logger$4.info({
1317
- ID: track.id,
1318
- mediaType: MEDIA_STREAM_TRACK,
1319
- action: 'enableBNR()',
1320
- description: 'Checking if BNR module is present already'
1321
- });
1322
- var oldDestinationTrack = bnrProcessor.destinationTrack;
1323
- if (oldDestinationTrack && track.id === oldDestinationTrack.id) {
1324
- var oldTrackErrorMsg = 'BNR is enabled on the track already';
1325
- var oldTrackError = new Error(oldTrackErrorMsg);
1326
- logger$4.error({
1327
- ID: track.id,
1328
- mediaType: MEDIA_STREAM_TRACK,
1329
- action: 'enableBNR()',
1330
- description: oldTrackErrorMsg,
1331
- error: oldTrackError
1332
- });
1333
- throw oldTrackError;
1334
- }
1335
- if (bnrProcessor.isModuleAdded) {
1336
- logger$4.debug({
1337
- ID: track.id,
1338
- mediaType: MEDIA_STREAM_TRACK,
1339
- action: 'enableBNR()',
1340
- description: 'Disposing existing BNR module'
1341
- });
1342
- workletNode = bnrProcessor.workletNode;
1343
- workletNode.port.postMessage('DISPOSE');
1344
- }
1345
- logger$4.info({
1346
- ID: track.id,
1347
- mediaType: MEDIA_STREAM_TRACK,
1348
- action: 'enableBNR()',
1349
- description: 'Creating worklet node, connecting source and destination streams'
1350
- });
1351
- var audioContext = yield loadProcessor();
1352
- workletNode = bnrProcessor.workletNode;
1353
- workletNode.port.postMessage('ENABLE');
1354
- bnrProcessor.sourceNode = audioContext.createMediaStreamSource(streamFromTrack);
1355
- bnrProcessor.sourceNode.connect(workletNode);
1356
- bnrProcessor.destinationStream = audioContext.createMediaStreamDestination();
1357
- workletNode.connect(bnrProcessor.destinationStream);
1358
- logger$4.info({
1359
- ID: track.id,
1360
- mediaType: MEDIA_STREAM_TRACK,
1361
- action: 'enableBNR()',
1362
- description: 'Obtaining noise reduced track and returning'
1363
- });
1364
- var destinationStream = bnrProcessor.destinationStream.stream;
1365
- var [destinationTrack] = destinationStream.getAudioTracks();
1366
- bnrProcessor.destinationTrack = destinationTrack;
1367
- return destinationTrack;
1368
- } catch (error) {
1369
- logger$4.error({
1370
- ID: track.id,
1371
- mediaType: MEDIA_STREAM_TRACK,
1372
- action: 'enableBNR()',
1373
- description: 'Error in enableBNR',
1374
- error: error
1375
- });
1376
- throw error;
1377
- }
1378
- });
1379
- return _enableBNR.apply(this, arguments);
1380
- }
1381
- function disableBNR() {
1382
- logger$4.debug({
1383
- mediaType: MEDIA_STREAM_TRACK,
1384
- action: 'disableBNR()',
1385
- description: 'Called'
1386
- });
1387
- try {
1388
- var workletNode;
1389
- logger$4.info({
1390
- mediaType: MEDIA_STREAM_TRACK,
1391
- action: 'disableBNR()',
1392
- description: 'Checking if BNR is enabled before disabling'
1393
- });
1394
- if (!bnrProcessor.isModuleAdded) {
1395
- var error = new Error('Can not disable as BNR is not enabled');
1396
- logger$4.error({
1397
- mediaType: MEDIA_STREAM_TRACK,
1398
- action: 'disableBNR()',
1399
- description: 'Can not disable as BNR is not enabled'
1400
- });
1401
- throw error;
1402
- } else {
1403
- logger$4.info({
1404
- mediaType: MEDIA_STREAM_TRACK,
1405
- action: 'disableBNR()',
1406
- description: 'Using existing AudioWorkletNode for disabling BNR'
1407
- });
1408
- workletNode = bnrProcessor.workletNode;
1409
- }
1410
- workletNode.port.postMessage('DISPOSE');
1411
- logger$4.info({
1412
- mediaType: MEDIA_STREAM_TRACK,
1413
- action: 'disableBNR()',
1414
- description: 'Obtaining raw media stream track and removing bnr context'
1415
- });
1416
- var bnrDisabledStream = bnrProcessor.sourceNode.mediaStream;
1417
- var [track] = bnrDisabledStream === null || bnrDisabledStream === void 0 ? void 0 : bnrDisabledStream.getAudioTracks();
1418
- bnrProcessor.isModuleAdded = false;
1419
- delete bnrProcessor.workletNode;
1420
- delete bnrProcessor.audioContext;
1421
- delete bnrProcessor.sourceNode;
1422
- delete bnrProcessor.destinationStream;
1423
- delete bnrProcessor.destinationTrack;
1424
- return track;
1425
- } catch (error) {
1426
- logger$4.error({
1427
- mediaType: MEDIA_STREAM_TRACK,
1428
- action: 'disableBNR()',
1429
- description: 'Error in disableBNR',
1430
- error: error
1431
- });
1432
- throw error;
1433
- }
1434
- }
1435
-
1436
1244
  var ErrorCode;
1437
1245
  (function (ErrorCode) {
1438
1246
  ErrorCode[ErrorCode["MediaConnectionError"] = 30001] = "MediaConnectionError";
@@ -18148,7 +17956,8 @@ var initialMqeIntervalStreamTransmitVideo = {
18148
17956
  localConfigurationChanges: 0,
18149
17957
  remoteConfigurationChanges: 0,
18150
17958
  h264CodecProfile: 'BP',
18151
- isAvatar: false
17959
+ isAvatar: false,
17960
+ camOutputFps: 0
18152
17961
  };
18153
17962
 
18154
17963
  var max = array => {
@@ -18744,7 +18553,7 @@ class MqeBuilder {
18744
18553
  return result;
18745
18554
  }
18746
18555
  buildMqeIntervalStreamTransmitVideo(id) {
18747
- var _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43, _getPropertyFromStats44, _getPropertyFromStats45, _getH264ProfileFromSt2, _getPropertyFromStats46;
18556
+ var _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43, _getPropertyFromStats44, _getPropertyFromStats45, _getPropertyFromStats46, _getH264ProfileFromSt2, _getPropertyFromStats47;
18748
18557
  var result = structuredClone(initialMqeIntervalStreamTransmitVideo);
18749
18558
  result.common = this.buildMqeIntervalStreamTransmitCommon(id);
18750
18559
  var current = this.currentIntervalStats;
@@ -18759,15 +18568,16 @@ class MqeBuilder {
18759
18568
  var currentKeyFramesEncoded = (_getPropertyFromStats40 = getPropertyFromStatsById(current, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats40 !== void 0 ? _getPropertyFromStats40 : 0;
18760
18569
  var previousKeyFramesEncoded = (_getPropertyFromStats41 = getPropertyFromStatsById(previous, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats41 !== void 0 ? _getPropertyFromStats41 : 0;
18761
18570
  result.transmittedKeyFrames = currentKeyFramesEncoded - previousKeyFramesEncoded;
18762
- var currentFirCount = (_getPropertyFromStats42 = getPropertyFromStatsById(current, id, 'firCount')) !== null && _getPropertyFromStats42 !== void 0 ? _getPropertyFromStats42 : 0;
18763
- var previousFirCount = (_getPropertyFromStats43 = getPropertyFromStatsById(previous, id, 'firCount')) !== null && _getPropertyFromStats43 !== void 0 ? _getPropertyFromStats43 : 0;
18764
- var currentPliCount = (_getPropertyFromStats44 = getPropertyFromStatsById(current, id, 'pliCount')) !== null && _getPropertyFromStats44 !== void 0 ? _getPropertyFromStats44 : 0;
18765
- var previousPliCount = (_getPropertyFromStats45 = getPropertyFromStatsById(previous, id, 'pliCount')) !== null && _getPropertyFromStats45 !== void 0 ? _getPropertyFromStats45 : 0;
18571
+ result.camOutputFps = (_getPropertyFromStats42 = getPropertyFromStatsByType(current, 'media-source', 'framesPerSecond')) !== null && _getPropertyFromStats42 !== void 0 ? _getPropertyFromStats42 : 0;
18572
+ var currentFirCount = (_getPropertyFromStats43 = getPropertyFromStatsById(current, id, 'firCount')) !== null && _getPropertyFromStats43 !== void 0 ? _getPropertyFromStats43 : 0;
18573
+ var previousFirCount = (_getPropertyFromStats44 = getPropertyFromStatsById(previous, id, 'firCount')) !== null && _getPropertyFromStats44 !== void 0 ? _getPropertyFromStats44 : 0;
18574
+ var currentPliCount = (_getPropertyFromStats45 = getPropertyFromStatsById(current, id, 'pliCount')) !== null && _getPropertyFromStats45 !== void 0 ? _getPropertyFromStats45 : 0;
18575
+ var previousPliCount = (_getPropertyFromStats46 = getPropertyFromStatsById(previous, id, 'pliCount')) !== null && _getPropertyFromStats46 !== void 0 ? _getPropertyFromStats46 : 0;
18766
18576
  result.requestedKeyFrames = currentFirCount - previousFirCount + (currentPliCount - previousPliCount);
18767
18577
  result.localConfigurationChanges = 0;
18768
18578
  var currentH264CodecProfile = (_getH264ProfileFromSt2 = getH264ProfileFromStatsByStreamStatsId(current, id)) !== null && _getH264ProfileFromSt2 !== void 0 ? _getH264ProfileFromSt2 : 'BP';
18769
18579
  result.h264CodecProfile = currentH264CodecProfile;
18770
- var currentSourceState = (_getPropertyFromStats46 = getPropertyFromStatsById(current, id, 'sourceState')) !== null && _getPropertyFromStats46 !== void 0 ? _getPropertyFromStats46 : '';
18580
+ var currentSourceState = (_getPropertyFromStats47 = getPropertyFromStatsById(current, id, 'sourceState')) !== null && _getPropertyFromStats47 !== void 0 ? _getPropertyFromStats47 : '';
18771
18581
  result.isAvatar = currentSourceState === 'avatar';
18772
18582
  var currentLastUsedEffect = getPropertyFromStatsById(current, id, 'lastUsedEffect');
18773
18583
  if ((currentLastUsedEffect === null || currentLastUsedEffect === void 0 ? void 0 : currentLastUsedEffect.kind) === 'virtual-background-effect' && 'virtualBackgroundMode' in currentLastUsedEffect) {
@@ -18786,34 +18596,34 @@ class MqeBuilder {
18786
18596
  return result;
18787
18597
  }
18788
18598
  buildMqeIntervalStreamTransmitCommon(id) {
18789
- var _getPropertyFromStats47, _getPropertyFromStats48, _getPropertyFromStats49, _getPropertyFromStats50, _getPropertyFromStats53, _getPropertyFromStats54, _getPropertyFromStats55, _getPropertyFromStats56, _getCodecFromStatsByS2;
18599
+ var _getPropertyFromStats48, _getPropertyFromStats49, _getPropertyFromStats50, _getPropertyFromStats51, _getPropertyFromStats54, _getPropertyFromStats55, _getPropertyFromStats56, _getPropertyFromStats57, _getCodecFromStatsByS2;
18790
18600
  var result = structuredClone(initialMqeIntervalStreamTransmitCommon);
18791
18601
  var current = this.currentIntervalStats;
18792
18602
  var previous = this.previousIntervalStats;
18793
- var currentPacketsSent = (_getPropertyFromStats47 = getPropertyFromStatsById(current, id, 'packetsSent')) !== null && _getPropertyFromStats47 !== void 0 ? _getPropertyFromStats47 : 0;
18794
- var previousPacketsSent = (_getPropertyFromStats48 = getPropertyFromStatsById(previous, id, 'packetsSent')) !== null && _getPropertyFromStats48 !== void 0 ? _getPropertyFromStats48 : 0;
18795
- var currentRetransmittedPacketsSent = (_getPropertyFromStats49 = getPropertyFromStatsById(current, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats49 !== void 0 ? _getPropertyFromStats49 : 0;
18796
- var previousRetransmittedPacketsSent = (_getPropertyFromStats50 = getPropertyFromStatsById(previous, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats50 !== void 0 ? _getPropertyFromStats50 : 0;
18603
+ var currentPacketsSent = (_getPropertyFromStats48 = getPropertyFromStatsById(current, id, 'packetsSent')) !== null && _getPropertyFromStats48 !== void 0 ? _getPropertyFromStats48 : 0;
18604
+ var previousPacketsSent = (_getPropertyFromStats49 = getPropertyFromStatsById(previous, id, 'packetsSent')) !== null && _getPropertyFromStats49 !== void 0 ? _getPropertyFromStats49 : 0;
18605
+ var currentRetransmittedPacketsSent = (_getPropertyFromStats50 = getPropertyFromStatsById(current, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats50 !== void 0 ? _getPropertyFromStats50 : 0;
18606
+ var previousRetransmittedPacketsSent = (_getPropertyFromStats51 = getPropertyFromStatsById(previous, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats51 !== void 0 ? _getPropertyFromStats51 : 0;
18797
18607
  result.rtpPackets = currentPacketsSent - previousPacketsSent - (currentRetransmittedPacketsSent - previousRetransmittedPacketsSent);
18798
18608
  if (this.mediaKind === 'video') {
18799
- var _getPropertyFromStats51, _getPropertyFromStats52;
18800
- var currentMaxTransmittedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats51 = getPropertyFromStatsById(current, id, 'maxTransmittedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats51 !== void 0 ? _getPropertyFromStats51 : 0;
18609
+ var _getPropertyFromStats52, _getPropertyFromStats53;
18610
+ var currentMaxTransmittedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats52 = getPropertyFromStatsById(current, id, 'maxTransmittedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats52 !== void 0 ? _getPropertyFromStats52 : 0;
18801
18611
  result.transmittedFrameRate = currentMaxTransmittedFrameRateForMaxRequestedFrameSize;
18802
- var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats52 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats52 !== void 0 ? _getPropertyFromStats52 : 0;
18612
+ var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats53 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats53 !== void 0 ? _getPropertyFromStats53 : 0;
18803
18613
  result.requestedFrames = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
18804
18614
  }
18805
- var currentBytesSent = (_getPropertyFromStats53 = getPropertyFromStatsById(current, id, 'bytesSent')) !== null && _getPropertyFromStats53 !== void 0 ? _getPropertyFromStats53 : 0;
18806
- var previousBytesSent = (_getPropertyFromStats54 = getPropertyFromStatsById(previous, id, 'bytesSent')) !== null && _getPropertyFromStats54 !== void 0 ? _getPropertyFromStats54 : 0;
18807
- var currentRetransmittedBytesSent = (_getPropertyFromStats55 = getPropertyFromStatsById(current, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
18808
- var previousRetransmittedBytesSent = (_getPropertyFromStats56 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats56 !== void 0 ? _getPropertyFromStats56 : 0;
18615
+ var currentBytesSent = (_getPropertyFromStats54 = getPropertyFromStatsById(current, id, 'bytesSent')) !== null && _getPropertyFromStats54 !== void 0 ? _getPropertyFromStats54 : 0;
18616
+ var previousBytesSent = (_getPropertyFromStats55 = getPropertyFromStatsById(previous, id, 'bytesSent')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
18617
+ var currentRetransmittedBytesSent = (_getPropertyFromStats56 = getPropertyFromStatsById(current, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats56 !== void 0 ? _getPropertyFromStats56 : 0;
18618
+ var previousRetransmittedBytesSent = (_getPropertyFromStats57 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats57 !== void 0 ? _getPropertyFromStats57 : 0;
18809
18619
  result.transmittedBitrate = bytesToBitrate(currentBytesSent - previousBytesSent - (currentRetransmittedBytesSent - previousRetransmittedBytesSent), MQE_INTERVAL);
18810
18620
  if (this.mediaKind === 'audio') {
18811
- var _getPropertyFromStats57;
18812
- var currentRequestedBitrateArray = (_getPropertyFromStats57 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats57 !== void 0 ? _getPropertyFromStats57 : [];
18621
+ var _getPropertyFromStats58;
18622
+ var currentRequestedBitrateArray = (_getPropertyFromStats58 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats58 !== void 0 ? _getPropertyFromStats58 : [];
18813
18623
  result.requestedBitrate = max(currentRequestedBitrateArray);
18814
18624
  } else {
18815
- var _getPropertyFromStats58;
18816
- var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats58 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats58 !== void 0 ? _getPropertyFromStats58 : 0;
18625
+ var _getPropertyFromStats59;
18626
+ var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats59 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats59 !== void 0 ? _getPropertyFromStats59 : 0;
18817
18627
  result.requestedBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
18818
18628
  }
18819
18629
  var currentCodec = (_getCodecFromStatsByS2 = getCodecFromStatsByStreamStatsId(current, id)) !== null && _getCodecFromStatsByS2 !== void 0 ? _getCodecFromStatsByS2 : this.mediaKind === 'audio' ? 'opus' : 'H264';
@@ -19529,6 +19339,10 @@ class StatsMonitor extends EventEmitter$5 {
19529
19339
  if (currentFramesSent === previousFramesSent) {
19530
19340
  getLogger().info("StatsMonitor#checkOutboundVideo --> No video frames sent, last frames sent count: ".concat(currentFramesSent, "."));
19531
19341
  }
19342
+ var framesPerSecond = getPropertyFromStatsByType(current, 'media-source', 'framesPerSecond');
19343
+ if (framesPerSecond === 0) {
19344
+ getLogger().info("StatsMonitor#checkOutboundVideo --> Frames per second from local video source is 0.");
19345
+ }
19532
19346
  }
19533
19347
  checkInboundShare(previous, current) {
19534
19348
  var currentSourceStateArray = getPropertyFromStatsByTypeInArray(current, 'inbound-rtp', 'sourceState');
@@ -19582,13 +19396,7 @@ var Media = {
19582
19396
  getMicrophones: getMicrophones,
19583
19397
  getSpeakers: getSpeakers,
19584
19398
  on: on$1,
19585
- off: off$1,
19586
- Effects: {
19587
- BNR: {
19588
- enableBNR: enableBNR,
19589
- disableBNR: disableBNR
19590
- }
19591
- }
19399
+ off: off$1
19592
19400
  };
19593
19401
 
19594
19402
  exports.AV1Codec = AV1Codec;
package/dist/esm/index.js CHANGED
@@ -1237,198 +1237,6 @@ var off$1 = (eventName, listener) => {
1237
1237
  eventEmitter.off(eventName, listener);
1238
1238
  };
1239
1239
 
1240
- var bnrProcessor = {
1241
- isModuleAdded: false,
1242
- workletProcessorUrl: 'https://models.intelligence.webex.com/bnr/1.1.0/noise-reduction-effect.worklet.js'
1243
- };
1244
- function isValidTrack(track) {
1245
- var supportedConstraints = navigator.mediaDevices.getSupportedConstraints();
1246
- var supportedSampleRates = [16000, 32000, 48000];
1247
- if (supportedConstraints.sampleRate) {
1248
- var settings = getTrackSettings(track);
1249
- var {
1250
- sampleRate
1251
- } = settings;
1252
- if (sampleRate && !supportedSampleRates.includes(sampleRate)) {
1253
- var error = new Error("Sample rate of ".concat(sampleRate, " is not supported."));
1254
- logger$4.error({
1255
- ID: track.id,
1256
- mediaType: MEDIA_STREAM_TRACK,
1257
- action: 'isValidTrack()',
1258
- description: error.message,
1259
- error
1260
- });
1261
- throw error;
1262
- } else {
1263
- return true;
1264
- }
1265
- } else {
1266
- var _error = new Error('Not supported');
1267
- logger$4.info({
1268
- ID: track.id,
1269
- mediaType: MEDIA_STREAM_TRACK,
1270
- action: 'isValidTrack()',
1271
- description: _error.message,
1272
- error: _error
1273
- });
1274
- return true;
1275
- }
1276
- }
1277
- function loadProcessor() {
1278
- return _loadProcessor.apply(this, arguments);
1279
- }
1280
- function _loadProcessor() {
1281
- _loadProcessor = _asyncToGenerator(function* () {
1282
- logger$4.info({
1283
- mediaType: MEDIA_STREAM_TRACK,
1284
- action: 'loadProcessor()',
1285
- description: 'Creating and loading BNR module'
1286
- });
1287
- var audioContext = new AudioContext();
1288
- bnrProcessor.isModuleAdded = true;
1289
- bnrProcessor.audioContext = audioContext;
1290
- yield audioContext.audioWorklet.addModule(bnrProcessor.workletProcessorUrl);
1291
- bnrProcessor.workletNode = new AudioWorkletNode(audioContext, 'noise-reduction-worklet-processor');
1292
- return audioContext;
1293
- });
1294
- return _loadProcessor.apply(this, arguments);
1295
- }
1296
- function enableBNR(_x) {
1297
- return _enableBNR.apply(this, arguments);
1298
- }
1299
- function _enableBNR() {
1300
- _enableBNR = _asyncToGenerator(function* (track) {
1301
- logger$4.debug({
1302
- ID: track.id,
1303
- mediaType: MEDIA_STREAM_TRACK,
1304
- action: 'enableBNR()',
1305
- description: 'Called'
1306
- });
1307
- try {
1308
- isValidTrack(track);
1309
- var streamFromTrack = new MediaStream();
1310
- streamFromTrack.addTrack(track);
1311
- var workletNode;
1312
- logger$4.info({
1313
- ID: track.id,
1314
- mediaType: MEDIA_STREAM_TRACK,
1315
- action: 'enableBNR()',
1316
- description: 'Checking if BNR module is present already'
1317
- });
1318
- var oldDestinationTrack = bnrProcessor.destinationTrack;
1319
- if (oldDestinationTrack && track.id === oldDestinationTrack.id) {
1320
- var oldTrackErrorMsg = 'BNR is enabled on the track already';
1321
- var oldTrackError = new Error(oldTrackErrorMsg);
1322
- logger$4.error({
1323
- ID: track.id,
1324
- mediaType: MEDIA_STREAM_TRACK,
1325
- action: 'enableBNR()',
1326
- description: oldTrackErrorMsg,
1327
- error: oldTrackError
1328
- });
1329
- throw oldTrackError;
1330
- }
1331
- if (bnrProcessor.isModuleAdded) {
1332
- logger$4.debug({
1333
- ID: track.id,
1334
- mediaType: MEDIA_STREAM_TRACK,
1335
- action: 'enableBNR()',
1336
- description: 'Disposing existing BNR module'
1337
- });
1338
- workletNode = bnrProcessor.workletNode;
1339
- workletNode.port.postMessage('DISPOSE');
1340
- }
1341
- logger$4.info({
1342
- ID: track.id,
1343
- mediaType: MEDIA_STREAM_TRACK,
1344
- action: 'enableBNR()',
1345
- description: 'Creating worklet node, connecting source and destination streams'
1346
- });
1347
- var audioContext = yield loadProcessor();
1348
- workletNode = bnrProcessor.workletNode;
1349
- workletNode.port.postMessage('ENABLE');
1350
- bnrProcessor.sourceNode = audioContext.createMediaStreamSource(streamFromTrack);
1351
- bnrProcessor.sourceNode.connect(workletNode);
1352
- bnrProcessor.destinationStream = audioContext.createMediaStreamDestination();
1353
- workletNode.connect(bnrProcessor.destinationStream);
1354
- logger$4.info({
1355
- ID: track.id,
1356
- mediaType: MEDIA_STREAM_TRACK,
1357
- action: 'enableBNR()',
1358
- description: 'Obtaining noise reduced track and returning'
1359
- });
1360
- var destinationStream = bnrProcessor.destinationStream.stream;
1361
- var [destinationTrack] = destinationStream.getAudioTracks();
1362
- bnrProcessor.destinationTrack = destinationTrack;
1363
- return destinationTrack;
1364
- } catch (error) {
1365
- logger$4.error({
1366
- ID: track.id,
1367
- mediaType: MEDIA_STREAM_TRACK,
1368
- action: 'enableBNR()',
1369
- description: 'Error in enableBNR',
1370
- error: error
1371
- });
1372
- throw error;
1373
- }
1374
- });
1375
- return _enableBNR.apply(this, arguments);
1376
- }
1377
- function disableBNR() {
1378
- logger$4.debug({
1379
- mediaType: MEDIA_STREAM_TRACK,
1380
- action: 'disableBNR()',
1381
- description: 'Called'
1382
- });
1383
- try {
1384
- var workletNode;
1385
- logger$4.info({
1386
- mediaType: MEDIA_STREAM_TRACK,
1387
- action: 'disableBNR()',
1388
- description: 'Checking if BNR is enabled before disabling'
1389
- });
1390
- if (!bnrProcessor.isModuleAdded) {
1391
- var error = new Error('Can not disable as BNR is not enabled');
1392
- logger$4.error({
1393
- mediaType: MEDIA_STREAM_TRACK,
1394
- action: 'disableBNR()',
1395
- description: 'Can not disable as BNR is not enabled'
1396
- });
1397
- throw error;
1398
- } else {
1399
- logger$4.info({
1400
- mediaType: MEDIA_STREAM_TRACK,
1401
- action: 'disableBNR()',
1402
- description: 'Using existing AudioWorkletNode for disabling BNR'
1403
- });
1404
- workletNode = bnrProcessor.workletNode;
1405
- }
1406
- workletNode.port.postMessage('DISPOSE');
1407
- logger$4.info({
1408
- mediaType: MEDIA_STREAM_TRACK,
1409
- action: 'disableBNR()',
1410
- description: 'Obtaining raw media stream track and removing bnr context'
1411
- });
1412
- var bnrDisabledStream = bnrProcessor.sourceNode.mediaStream;
1413
- var [track] = bnrDisabledStream === null || bnrDisabledStream === void 0 ? void 0 : bnrDisabledStream.getAudioTracks();
1414
- bnrProcessor.isModuleAdded = false;
1415
- delete bnrProcessor.workletNode;
1416
- delete bnrProcessor.audioContext;
1417
- delete bnrProcessor.sourceNode;
1418
- delete bnrProcessor.destinationStream;
1419
- delete bnrProcessor.destinationTrack;
1420
- return track;
1421
- } catch (error) {
1422
- logger$4.error({
1423
- mediaType: MEDIA_STREAM_TRACK,
1424
- action: 'disableBNR()',
1425
- description: 'Error in disableBNR',
1426
- error: error
1427
- });
1428
- throw error;
1429
- }
1430
- }
1431
-
1432
1240
  var ErrorCode;
1433
1241
  (function (ErrorCode) {
1434
1242
  ErrorCode[ErrorCode["MediaConnectionError"] = 30001] = "MediaConnectionError";
@@ -18144,7 +17952,8 @@ var initialMqeIntervalStreamTransmitVideo = {
18144
17952
  localConfigurationChanges: 0,
18145
17953
  remoteConfigurationChanges: 0,
18146
17954
  h264CodecProfile: 'BP',
18147
- isAvatar: false
17955
+ isAvatar: false,
17956
+ camOutputFps: 0
18148
17957
  };
18149
17958
 
18150
17959
  var max = array => {
@@ -18740,7 +18549,7 @@ class MqeBuilder {
18740
18549
  return result;
18741
18550
  }
18742
18551
  buildMqeIntervalStreamTransmitVideo(id) {
18743
- var _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43, _getPropertyFromStats44, _getPropertyFromStats45, _getH264ProfileFromSt2, _getPropertyFromStats46;
18552
+ var _getPropertyFromStats37, _getPropertyFromStats38, _getPropertyFromStats39, _getPropertyFromStats40, _getPropertyFromStats41, _getPropertyFromStats42, _getPropertyFromStats43, _getPropertyFromStats44, _getPropertyFromStats45, _getPropertyFromStats46, _getH264ProfileFromSt2, _getPropertyFromStats47;
18744
18553
  var result = structuredClone(initialMqeIntervalStreamTransmitVideo);
18745
18554
  result.common = this.buildMqeIntervalStreamTransmitCommon(id);
18746
18555
  var current = this.currentIntervalStats;
@@ -18755,15 +18564,16 @@ class MqeBuilder {
18755
18564
  var currentKeyFramesEncoded = (_getPropertyFromStats40 = getPropertyFromStatsById(current, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats40 !== void 0 ? _getPropertyFromStats40 : 0;
18756
18565
  var previousKeyFramesEncoded = (_getPropertyFromStats41 = getPropertyFromStatsById(previous, id, 'keyFramesEncoded')) !== null && _getPropertyFromStats41 !== void 0 ? _getPropertyFromStats41 : 0;
18757
18566
  result.transmittedKeyFrames = currentKeyFramesEncoded - previousKeyFramesEncoded;
18758
- var currentFirCount = (_getPropertyFromStats42 = getPropertyFromStatsById(current, id, 'firCount')) !== null && _getPropertyFromStats42 !== void 0 ? _getPropertyFromStats42 : 0;
18759
- var previousFirCount = (_getPropertyFromStats43 = getPropertyFromStatsById(previous, id, 'firCount')) !== null && _getPropertyFromStats43 !== void 0 ? _getPropertyFromStats43 : 0;
18760
- var currentPliCount = (_getPropertyFromStats44 = getPropertyFromStatsById(current, id, 'pliCount')) !== null && _getPropertyFromStats44 !== void 0 ? _getPropertyFromStats44 : 0;
18761
- var previousPliCount = (_getPropertyFromStats45 = getPropertyFromStatsById(previous, id, 'pliCount')) !== null && _getPropertyFromStats45 !== void 0 ? _getPropertyFromStats45 : 0;
18567
+ result.camOutputFps = (_getPropertyFromStats42 = getPropertyFromStatsByType(current, 'media-source', 'framesPerSecond')) !== null && _getPropertyFromStats42 !== void 0 ? _getPropertyFromStats42 : 0;
18568
+ var currentFirCount = (_getPropertyFromStats43 = getPropertyFromStatsById(current, id, 'firCount')) !== null && _getPropertyFromStats43 !== void 0 ? _getPropertyFromStats43 : 0;
18569
+ var previousFirCount = (_getPropertyFromStats44 = getPropertyFromStatsById(previous, id, 'firCount')) !== null && _getPropertyFromStats44 !== void 0 ? _getPropertyFromStats44 : 0;
18570
+ var currentPliCount = (_getPropertyFromStats45 = getPropertyFromStatsById(current, id, 'pliCount')) !== null && _getPropertyFromStats45 !== void 0 ? _getPropertyFromStats45 : 0;
18571
+ var previousPliCount = (_getPropertyFromStats46 = getPropertyFromStatsById(previous, id, 'pliCount')) !== null && _getPropertyFromStats46 !== void 0 ? _getPropertyFromStats46 : 0;
18762
18572
  result.requestedKeyFrames = currentFirCount - previousFirCount + (currentPliCount - previousPliCount);
18763
18573
  result.localConfigurationChanges = 0;
18764
18574
  var currentH264CodecProfile = (_getH264ProfileFromSt2 = getH264ProfileFromStatsByStreamStatsId(current, id)) !== null && _getH264ProfileFromSt2 !== void 0 ? _getH264ProfileFromSt2 : 'BP';
18765
18575
  result.h264CodecProfile = currentH264CodecProfile;
18766
- var currentSourceState = (_getPropertyFromStats46 = getPropertyFromStatsById(current, id, 'sourceState')) !== null && _getPropertyFromStats46 !== void 0 ? _getPropertyFromStats46 : '';
18576
+ var currentSourceState = (_getPropertyFromStats47 = getPropertyFromStatsById(current, id, 'sourceState')) !== null && _getPropertyFromStats47 !== void 0 ? _getPropertyFromStats47 : '';
18767
18577
  result.isAvatar = currentSourceState === 'avatar';
18768
18578
  var currentLastUsedEffect = getPropertyFromStatsById(current, id, 'lastUsedEffect');
18769
18579
  if ((currentLastUsedEffect === null || currentLastUsedEffect === void 0 ? void 0 : currentLastUsedEffect.kind) === 'virtual-background-effect' && 'virtualBackgroundMode' in currentLastUsedEffect) {
@@ -18782,34 +18592,34 @@ class MqeBuilder {
18782
18592
  return result;
18783
18593
  }
18784
18594
  buildMqeIntervalStreamTransmitCommon(id) {
18785
- var _getPropertyFromStats47, _getPropertyFromStats48, _getPropertyFromStats49, _getPropertyFromStats50, _getPropertyFromStats53, _getPropertyFromStats54, _getPropertyFromStats55, _getPropertyFromStats56, _getCodecFromStatsByS2;
18595
+ var _getPropertyFromStats48, _getPropertyFromStats49, _getPropertyFromStats50, _getPropertyFromStats51, _getPropertyFromStats54, _getPropertyFromStats55, _getPropertyFromStats56, _getPropertyFromStats57, _getCodecFromStatsByS2;
18786
18596
  var result = structuredClone(initialMqeIntervalStreamTransmitCommon);
18787
18597
  var current = this.currentIntervalStats;
18788
18598
  var previous = this.previousIntervalStats;
18789
- var currentPacketsSent = (_getPropertyFromStats47 = getPropertyFromStatsById(current, id, 'packetsSent')) !== null && _getPropertyFromStats47 !== void 0 ? _getPropertyFromStats47 : 0;
18790
- var previousPacketsSent = (_getPropertyFromStats48 = getPropertyFromStatsById(previous, id, 'packetsSent')) !== null && _getPropertyFromStats48 !== void 0 ? _getPropertyFromStats48 : 0;
18791
- var currentRetransmittedPacketsSent = (_getPropertyFromStats49 = getPropertyFromStatsById(current, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats49 !== void 0 ? _getPropertyFromStats49 : 0;
18792
- var previousRetransmittedPacketsSent = (_getPropertyFromStats50 = getPropertyFromStatsById(previous, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats50 !== void 0 ? _getPropertyFromStats50 : 0;
18599
+ var currentPacketsSent = (_getPropertyFromStats48 = getPropertyFromStatsById(current, id, 'packetsSent')) !== null && _getPropertyFromStats48 !== void 0 ? _getPropertyFromStats48 : 0;
18600
+ var previousPacketsSent = (_getPropertyFromStats49 = getPropertyFromStatsById(previous, id, 'packetsSent')) !== null && _getPropertyFromStats49 !== void 0 ? _getPropertyFromStats49 : 0;
18601
+ var currentRetransmittedPacketsSent = (_getPropertyFromStats50 = getPropertyFromStatsById(current, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats50 !== void 0 ? _getPropertyFromStats50 : 0;
18602
+ var previousRetransmittedPacketsSent = (_getPropertyFromStats51 = getPropertyFromStatsById(previous, id, 'retransmittedPacketsSent')) !== null && _getPropertyFromStats51 !== void 0 ? _getPropertyFromStats51 : 0;
18793
18603
  result.rtpPackets = currentPacketsSent - previousPacketsSent - (currentRetransmittedPacketsSent - previousRetransmittedPacketsSent);
18794
18604
  if (this.mediaKind === 'video') {
18795
- var _getPropertyFromStats51, _getPropertyFromStats52;
18796
- var currentMaxTransmittedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats51 = getPropertyFromStatsById(current, id, 'maxTransmittedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats51 !== void 0 ? _getPropertyFromStats51 : 0;
18605
+ var _getPropertyFromStats52, _getPropertyFromStats53;
18606
+ var currentMaxTransmittedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats52 = getPropertyFromStatsById(current, id, 'maxTransmittedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats52 !== void 0 ? _getPropertyFromStats52 : 0;
18797
18607
  result.transmittedFrameRate = currentMaxTransmittedFrameRateForMaxRequestedFrameSize;
18798
- var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats52 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats52 !== void 0 ? _getPropertyFromStats52 : 0;
18608
+ var currentMaxRequestedFrameRateForMaxRequestedFrameSize = (_getPropertyFromStats53 = getPropertyFromStatsById(current, id, 'maxRequestedFrameRateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats53 !== void 0 ? _getPropertyFromStats53 : 0;
18799
18609
  result.requestedFrames = currentMaxRequestedFrameRateForMaxRequestedFrameSize;
18800
18610
  }
18801
- var currentBytesSent = (_getPropertyFromStats53 = getPropertyFromStatsById(current, id, 'bytesSent')) !== null && _getPropertyFromStats53 !== void 0 ? _getPropertyFromStats53 : 0;
18802
- var previousBytesSent = (_getPropertyFromStats54 = getPropertyFromStatsById(previous, id, 'bytesSent')) !== null && _getPropertyFromStats54 !== void 0 ? _getPropertyFromStats54 : 0;
18803
- var currentRetransmittedBytesSent = (_getPropertyFromStats55 = getPropertyFromStatsById(current, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
18804
- var previousRetransmittedBytesSent = (_getPropertyFromStats56 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats56 !== void 0 ? _getPropertyFromStats56 : 0;
18611
+ var currentBytesSent = (_getPropertyFromStats54 = getPropertyFromStatsById(current, id, 'bytesSent')) !== null && _getPropertyFromStats54 !== void 0 ? _getPropertyFromStats54 : 0;
18612
+ var previousBytesSent = (_getPropertyFromStats55 = getPropertyFromStatsById(previous, id, 'bytesSent')) !== null && _getPropertyFromStats55 !== void 0 ? _getPropertyFromStats55 : 0;
18613
+ var currentRetransmittedBytesSent = (_getPropertyFromStats56 = getPropertyFromStatsById(current, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats56 !== void 0 ? _getPropertyFromStats56 : 0;
18614
+ var previousRetransmittedBytesSent = (_getPropertyFromStats57 = getPropertyFromStatsById(previous, id, 'retransmittedBytesSent')) !== null && _getPropertyFromStats57 !== void 0 ? _getPropertyFromStats57 : 0;
18805
18615
  result.transmittedBitrate = bytesToBitrate(currentBytesSent - previousBytesSent - (currentRetransmittedBytesSent - previousRetransmittedBytesSent), MQE_INTERVAL);
18806
18616
  if (this.mediaKind === 'audio') {
18807
- var _getPropertyFromStats57;
18808
- var currentRequestedBitrateArray = (_getPropertyFromStats57 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats57 !== void 0 ? _getPropertyFromStats57 : [];
18617
+ var _getPropertyFromStats58;
18618
+ var currentRequestedBitrateArray = (_getPropertyFromStats58 = getPropertyFromStatsById(current, id, 'requestedBitrateArray')) !== null && _getPropertyFromStats58 !== void 0 ? _getPropertyFromStats58 : [];
18809
18619
  result.requestedBitrate = max(currentRequestedBitrateArray);
18810
18620
  } else {
18811
- var _getPropertyFromStats58;
18812
- var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats58 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats58 !== void 0 ? _getPropertyFromStats58 : 0;
18621
+ var _getPropertyFromStats59;
18622
+ var currentMaxRequestedBitrateForMaxRequestedFrameSize = (_getPropertyFromStats59 = getPropertyFromStatsById(current, id, 'maxRequestedBitrateForMaxRequestedFrameSize')) !== null && _getPropertyFromStats59 !== void 0 ? _getPropertyFromStats59 : 0;
18813
18623
  result.requestedBitrate = currentMaxRequestedBitrateForMaxRequestedFrameSize;
18814
18624
  }
18815
18625
  var currentCodec = (_getCodecFromStatsByS2 = getCodecFromStatsByStreamStatsId(current, id)) !== null && _getCodecFromStatsByS2 !== void 0 ? _getCodecFromStatsByS2 : this.mediaKind === 'audio' ? 'opus' : 'H264';
@@ -19525,6 +19335,10 @@ class StatsMonitor extends EventEmitter$5 {
19525
19335
  if (currentFramesSent === previousFramesSent) {
19526
19336
  getLogger().info("StatsMonitor#checkOutboundVideo --> No video frames sent, last frames sent count: ".concat(currentFramesSent, "."));
19527
19337
  }
19338
+ var framesPerSecond = getPropertyFromStatsByType(current, 'media-source', 'framesPerSecond');
19339
+ if (framesPerSecond === 0) {
19340
+ getLogger().info("StatsMonitor#checkOutboundVideo --> Frames per second from local video source is 0.");
19341
+ }
19528
19342
  }
19529
19343
  checkInboundShare(previous, current) {
19530
19344
  var currentSourceStateArray = getPropertyFromStatsByTypeInArray(current, 'inbound-rtp', 'sourceState');
@@ -19578,13 +19392,7 @@ var Media = {
19578
19392
  getMicrophones: getMicrophones,
19579
19393
  getSpeakers: getSpeakers,
19580
19394
  on: on$1,
19581
- off: off$1,
19582
- Effects: {
19583
- BNR: {
19584
- enableBNR: enableBNR,
19585
- disableBNR: disableBNR
19586
- }
19587
- }
19395
+ off: off$1
19588
19396
  };
19589
19397
 
19590
19398
  export { AV1Codec, ActiveSpeakerInfo, CodecInfo$1 as CodecInfo, ConnectionState, ErrorType, Errors, H264Codec, InboundAudioIssueSubTypes, LocalCameraStream, LocalDisplayStream, LocalMicrophoneStream, LocalStream, LocalStreamEventNames, LocalSystemAudioStream, Media, MediaCodecMimeType, MediaConnectionEventNames, MediaContent, MediaFamily, MediaStreamTrackKind, MediaType, MultistreamRoapMediaConnection, NetworkQualityEventNames, NetworkQualityMonitor, PeerConnection, Policy, ReceiveSlot, ReceiveSlotEvents, ReceiverSelectedInfo, RecommendedOpusBitrates, RemoteStream, RemoteStreamEventNames, RemoteTrackType, RoapMediaConnection, SendSlot, StatsAnalyzer, StatsAnalyzerEventNames, StatsMonitor, StatsMonitorEventNames, StreamEventNames, StreamRequest, WcmeError, WcmeErrorType, configureWcmeLogger, createCameraAndMicrophoneStreams, createCameraStream, createDisplayMedia, createDisplayStream, createDisplayStreamWithAudio, createMicrophoneStream, getAudioInputDevices, getAudioOutputDevices, getDevices, getErrorDescription, getFrameSizeForPicSize, getLogger, getMediaFamily, getRecommendedMaxBitrateForFrameSize, getRecommendedMaxBitrateForPicSize, getVideoInputDevices, setLogger, setOnDeviceChangeHandler };
@@ -1 +1 @@
1
- {"version":3,"file":"MqeBuilder.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/MqeBuilder.ts"],"names":[],"mappings":"AAIA,OAAO,EAUL,wBAAwB,EACxB,yBAAyB,EACzB,0BAA0B,EAC1B,6BAA6B,EAC7B,8BAA8B,EAC9B,6BAA6B,EAC7B,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC/B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAe,QAAQ,EAAE,MAAM,SAAS,CAAC;AAmBhD,8BAAsB,UAAU;IAE9B,oBAAoB,EAAE,QAAQ,CAAa;IAG3C,qBAAqB,EAAE,QAAQ,CAAa;IAE5C,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1B,SAAS,CAAC,kBAAkB,EAAE,OAAO,CAAC;IAEtC,SAAS,CAAC,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;IAE3D,SAAS,CAAC,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;gBAO3B,MAAM,EAAE;QAClB,MAAM,EAAE,OAAO,CAAC;QAChB,kBAAkB,EAAE,OAAO,CAAC;QAC5B,SAAS,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;QACjD,SAAS,EAAE,OAAO,GAAG,OAAO,CAAC;KAC9B;IAYD,QAAQ,CAAC,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQ5C,0BAA0B,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IA2RpD,KAAK,IAAI,IAAI;IAQb,oBAAoB,IAAI,IAAI;IAiD5B,SAAS,CAAC,6BAA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nC,yBAAyB,GACzB,0BAA0B,CAC7B,CAAC,QAAQ,CAAC,CAAC;AAEZ,oBAAY,6BAA6B,GAAG,8BAA8B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzF,oBAAY,6BAA6B,GAAG,8BAA8B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAEzF,oBAAY,8BAA8B,GAAG,CACzC,6BAA6B,GAC7B,6BAA6B,CAChC,CAAC,QAAQ,CAAC,CAAC;AAEZ,oBAAY,8BAA8B,GAAG,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3F,oBAAY,8BAA8B,GAAG,+BAA+B,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAE3F,oBAAY,+BAA+B,GAAG,CAC1C,8BAA8B,GAC9B,8BAA8B,CACjC,CAAC,QAAQ,CAAC,CAAC;AAMZ,eAAO,MAAM,kBAAkB,EAAE,WAOhC,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,wBAM7C,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,yBAkB9C,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,8BAWnD,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,6BAElD,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,0BAgB/C,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,+BAMpD,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,8BAEnD,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,6BAUlD,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,8BAanD,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import * as MediaCore from './Media';
2
- import * as BNR from './Media/Effects/BNR';
3
2
  export * from './MediaConnection';
4
3
  export * from './StatsAnalyzer';
5
4
  export declare const Media: {
@@ -11,11 +10,5 @@ export declare const Media: {
11
10
  getSpeakers: () => Promise<MediaCore.Device[]>;
12
11
  on: typeof MediaCore.on;
13
12
  off: (eventName: string, listener: () => void) => void;
14
- Effects: {
15
- BNR: {
16
- enableBNR: typeof BNR.enableBNR;
17
- disableBNR: typeof BNR.disableBNR;
18
- };
19
- };
20
13
  };
21
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,GAAG,MAAM,qBAAqB,CAAC;AAE3C,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAGhC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;CAejB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,SAAS,CAAC;AAErC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAGhC,eAAO,MAAM,KAAK;;;;;;;;;CASjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/internal-media-core",
3
- "version": "2.23.2",
3
+ "version": "2.24.0",
4
4
  "files": [
5
5
  "dist/cjs",
6
6
  "dist/esm",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "scripts": {
39
39
  "prebuild": "rimraf dist",
40
- "build": "tsc && node postcompile.mjs && rollup --config",
40
+ "build": "tsc && rollup --config",
41
41
  "test": "jest --config=jest.config.js",
42
42
  "start": "web-dev-server --config web-dev-server.config.js",
43
43
  "test:spellcheck": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"",
@@ -92,7 +92,7 @@
92
92
  "@typescript-eslint/eslint-plugin": "^5.15.0",
93
93
  "@typescript-eslint/parser": "^5.15.0",
94
94
  "@web/dev-server": "^0.1.30",
95
- "@webex/event-dictionary-ts": "^1.0.1712",
95
+ "@webex/event-dictionary-ts": "^1.0.2109",
96
96
  "@xstate/cli": "0.3.3",
97
97
  "bowser": "^2.11.0",
98
98
  "chai": "^4.3.4",
@@ -1,5 +0,0 @@
1
- declare function isValidTrack(track: MediaStreamTrack): boolean;
2
- declare function enableBNR(track: MediaStreamTrack): Promise<MediaStreamTrack>;
3
- declare function disableBNR(): MediaStreamTrack;
4
- export { isValidTrack, enableBNR, disableBNR };
5
- //# sourceMappingURL=Bnr.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Bnr.d.ts","sourceRoot":"","sources":["../../../../../src/Media/Effects/BNR/Bnr.ts"],"names":[],"mappings":"AA0BA,iBAAS,YAAY,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAwCtD;AAmCD,iBAAe,SAAS,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAiG3E;AAQD,iBAAS,UAAU,IAAI,gBAAgB,CAmEtC;AAED,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Bnr.integration-test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Bnr.integration-test.d.ts","sourceRoot":"","sources":["../../../../../src/Media/Effects/BNR/Bnr.integration-test.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Bnr.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Bnr.test.d.ts","sourceRoot":"","sources":["../../../../../src/Media/Effects/BNR/Bnr.test.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- declare const _default: () => void;
2
- export default _default;
3
- //# sourceMappingURL=BnrMock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BnrMock.d.ts","sourceRoot":"","sources":["../../../../../src/Media/Effects/BNR/BnrMock.ts"],"names":[],"mappings":";AAgHA,wBAoBE"}
@@ -1,2 +0,0 @@
1
- export * from './Bnr';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Media/Effects/BNR/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}