@webex/internal-media-core 2.13.0 → 2.14.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/dist/cjs/index.js +104 -39
- package/dist/esm/index.js +103 -40
- package/dist/types/MediaConnection/MultistreamRoapMediaConnection.d.ts +1 -1
- package/dist/types/MediaConnection/MultistreamRoapMediaConnection.d.ts.map +1 -1
- package/dist/types/StatsAnalyzer/StatsAnalyzer.d.ts +1 -0
- package/dist/types/StatsAnalyzer/StatsAnalyzer.d.ts.map +1 -1
- package/dist/types/StatsAnalyzer/constants.d.ts.map +1 -1
- package/dist/types/StatsAnalyzer/utils.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -2342,10 +2342,11 @@ if(module.exports){module.exports=Logger;}else {Logger._prevLogger=global.Logger
|
|
|
2342
2342
|
* media has successfully been obtained.
|
|
2343
2343
|
*/function getUserMedia(constraints){return __awaiter$2(this,void 0,void 0,function*(){return navigator.mediaDevices.getUserMedia(constraints);});}/**
|
|
2344
2344
|
* Prompts the user for permission to use a user's display media and audio. If a video track is
|
|
2345
|
-
* absent from the constraints argument, one will still be provided.
|
|
2345
|
+
* absent from the constraints argument, one will still be provided. Includes experimental options
|
|
2346
|
+
* found in https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#options.
|
|
2346
2347
|
*
|
|
2347
2348
|
* @param constraints - A MediaStreamConstraints object specifying the types of media to request,
|
|
2348
|
-
* along with any requirements for each type.
|
|
2349
|
+
* along with any requirements for each type, as well as experimental options.
|
|
2349
2350
|
* @returns A Promise whose fulfillment handler receives a MediaStream object when the requested
|
|
2350
2351
|
* media has successfully been obtained.
|
|
2351
2352
|
*/function getDisplayMedia(constraints){return navigator.mediaDevices.getDisplayMedia(constraints);}/**
|
|
@@ -2398,22 +2399,62 @@ stream.getTracks().forEach(track=>track.stop());return callbackRes;}return callb
|
|
|
2398
2399
|
* 1. Previous captured video stream from the same device is not stopped.
|
|
2399
2400
|
* 2. Previous createCameraStream() call for the same device is in progress.
|
|
2400
2401
|
*
|
|
2401
|
-
* @param
|
|
2402
|
+
* @param cameraStreamConstructor - Constructor for the local camera stream.
|
|
2402
2403
|
* @param constraints - Video device constraints.
|
|
2403
2404
|
* @returns A LocalCameraStream object or an error.
|
|
2404
|
-
*/function createCameraStream(
|
|
2405
|
+
*/function createCameraStream(cameraStreamConstructor,constraints){return __awaiter$2(this,void 0,void 0,function*(){var stream;try{stream=yield getUserMedia({video:Object.assign({},constraints)});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create camera stream: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2406
|
+
return new cameraStreamConstructor(stream);});}/**
|
|
2405
2407
|
* Creates a LocalMicrophoneStream with the given constraints.
|
|
2406
2408
|
*
|
|
2407
|
-
* @param
|
|
2409
|
+
* @param microphoneStreamConstructor - Constructor for the local microphone stream.
|
|
2408
2410
|
* @param constraints - Audio device constraints.
|
|
2409
2411
|
* @returns A LocalMicrophoneStream object or an error.
|
|
2410
|
-
*/function createMicrophoneStream(
|
|
2412
|
+
*/function createMicrophoneStream(microphoneStreamConstructor,constraints){return __awaiter$2(this,void 0,void 0,function*(){var stream;try{stream=yield getUserMedia({audio:Object.assign({},constraints)});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create microphone stream: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2413
|
+
return new microphoneStreamConstructor(stream);});}/**
|
|
2414
|
+
* Creates a LocalCameraStream and a LocalMicrophoneStream with the given constraints.
|
|
2415
|
+
*
|
|
2416
|
+
* @param cameraStreamConstructor - Constructor for the local camera stream.
|
|
2417
|
+
* @param microphoneStreamConstructor - Constructor for the local microphone stream.
|
|
2418
|
+
* @param constraints - Object containing video and audio device constraints.
|
|
2419
|
+
* @param constraints.video - Video device constraints.
|
|
2420
|
+
* @param constraints.audio - Audio device constraints.
|
|
2421
|
+
* @returns A Promise that resolves to a LocalCameraStream and a LocalMicrophoneStream or an error.
|
|
2422
|
+
*/function createCameraAndMicrophoneStreams(cameraStreamConstructor,microphoneStreamConstructor,constraints){return __awaiter$2(this,void 0,void 0,function*(){var stream;try{stream=yield getUserMedia({video:Object.assign({},constraints===null||constraints===void 0?void 0:constraints.video),audio:Object.assign({},constraints===null||constraints===void 0?void 0:constraints.audio)});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create camera and microphone streams: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2423
|
+
var localCameraStream=new cameraStreamConstructor(new MediaStream(stream.getVideoTracks()));// eslint-disable-next-line new-cap
|
|
2424
|
+
var localMicrophoneStream=new microphoneStreamConstructor(new MediaStream(stream.getAudioTracks()));return [localCameraStream,localMicrophoneStream];});}/**
|
|
2425
|
+
* Creates a LocalDisplayStream and a LocalSystemAudioStream with the given parameters.
|
|
2426
|
+
*
|
|
2427
|
+
* This is a more advanced version of createDisplayStreamWithAudio that allows the user to specify
|
|
2428
|
+
* additional display media options and constraints.
|
|
2429
|
+
*
|
|
2430
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#options.
|
|
2431
|
+
*
|
|
2432
|
+
* @param options - An object containing the options for creating the display and system audio streams.
|
|
2433
|
+
* @param options.video - An object containing the video stream options.
|
|
2434
|
+
* @param options.video.displayStreamConstructor - Constructor for the local display stream.
|
|
2435
|
+
* @param options.video.constraints - Video device constraints.
|
|
2436
|
+
* @param options.video.videoContentHint - A hint for the content of the stream.
|
|
2437
|
+
* @param options.video.preferCurrentTab - Whether to offer the current tab as the most prominent capture source.
|
|
2438
|
+
* @param options.video.selfBrowserSurface - Whether to allow the user to select the current tab for capture.
|
|
2439
|
+
* @param options.video.surfaceSwitching - Whether to allow the user to dynamically switch the shared tab during screen-sharing.
|
|
2440
|
+
* @param options.video.monitorTypeSurfaces - Whether to offer the user the option to choose display surfaces whose type is monitor.
|
|
2441
|
+
* @param options.audio - An object containing the audio stream options. If present, a system audio stream will be created.
|
|
2442
|
+
* @param options.audio.systemAudioStreamConstructor - Constructor for the local system audio stream.
|
|
2443
|
+
* @param options.audio.constraints - Audio device constraints.
|
|
2444
|
+
* @param options.audio.systemAudio - Whether to include the system audio among the possible audio sources offered to the user.
|
|
2445
|
+
* @param options.controller - CaptureController to further manipulate the capture session.
|
|
2446
|
+
* @returns A Promise that resolves to a LocalDisplayStream and a LocalSystemAudioStream or an
|
|
2447
|
+
* error. If no system audio is available, the LocalSystemAudioStream will be resolved as null
|
|
2448
|
+
* instead.
|
|
2449
|
+
*/function createDisplayMedia(options){return __awaiter$2(this,void 0,void 0,function*(){var _a,_b;var stream;var videoConstraints=options.video.constraints||true;var audioConstraints=((_a=options.audio)===null||_a===void 0?void 0:_a.constraints)||!!options.audio;try{stream=yield getDisplayMedia({video:videoConstraints,audio:audioConstraints,controller:options.controller,preferCurrentTab:options.video.preferCurrentTab,selfBrowserSurface:options.video.selfBrowserSurface,surfaceSwitching:options.video.surfaceSwitching,systemAudio:(_b=options.audio)===null||_b===void 0?void 0:_b.systemAudio,monitorTypeSurfaces:options.video.monitorTypeSurfaces});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create display and/or system audio streams: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2450
|
+
var localDisplayStream=new options.video.displayStreamConstructor(new MediaStream(stream.getVideoTracks()));if(options.video.videoContentHint){localDisplayStream.contentHint=options.video.videoContentHint;}var localSystemAudioStream=null;if(options.audio&&stream.getAudioTracks().length>0){// eslint-disable-next-line new-cap
|
|
2451
|
+
localSystemAudioStream=new options.audio.systemAudioStreamConstructor(new MediaStream(stream.getAudioTracks()));}return [localDisplayStream,localSystemAudioStream];});}/**
|
|
2411
2452
|
* Creates a LocalDisplayStream with the given parameters.
|
|
2412
2453
|
*
|
|
2413
|
-
* @param
|
|
2454
|
+
* @param displayStreamConstructor - Constructor for the local display stream.
|
|
2414
2455
|
* @param videoContentHint - An optional parameter to give a hint for the content of the stream.
|
|
2415
2456
|
* @returns A Promise that resolves to a LocalDisplayStream or an error.
|
|
2416
|
-
*/function createDisplayStream(
|
|
2457
|
+
*/function createDisplayStream(displayStreamConstructor,videoContentHint){return __awaiter$2(this,void 0,void 0,function*(){var[localDisplayStream]=yield createDisplayMedia({video:{displayStreamConstructor,videoContentHint}});return localDisplayStream;});}/**
|
|
2417
2458
|
* Creates a LocalDisplayStream and a LocalSystemAudioStream with the given parameters.
|
|
2418
2459
|
*
|
|
2419
2460
|
* @param displayStreamConstructor - Constructor for the local display stream.
|
|
@@ -2422,9 +2463,7 @@ stream.getTracks().forEach(track=>track.stop());return callbackRes;}return callb
|
|
|
2422
2463
|
* @returns A Promise that resolves to a LocalDisplayStream and a LocalSystemAudioStream or an
|
|
2423
2464
|
* error. If no system audio is available, the LocalSystemAudioStream will be resolved as null
|
|
2424
2465
|
* instead.
|
|
2425
|
-
*/function createDisplayStreamWithAudio(displayStreamConstructor,systemAudioStreamConstructor,videoContentHint){return __awaiter$2(this,void 0,void 0,function*(){
|
|
2426
|
-
var localDisplayStream=new displayStreamConstructor(new MediaStream(stream.getVideoTracks()));if(videoContentHint){localDisplayStream.contentHint=videoContentHint;}var localSystemAudioStream=null;if(stream.getAudioTracks().length>0){// eslint-disable-next-line new-cap
|
|
2427
|
-
localSystemAudioStream=new systemAudioStreamConstructor(new MediaStream(stream.getAudioTracks()));}return [localDisplayStream,localSystemAudioStream];});}/**
|
|
2466
|
+
*/function createDisplayStreamWithAudio(displayStreamConstructor,systemAudioStreamConstructor,videoContentHint){return __awaiter$2(this,void 0,void 0,function*(){return createDisplayMedia({video:{displayStreamConstructor,videoContentHint},audio:{systemAudioStreamConstructor}});});}/**
|
|
2428
2467
|
* Enumerates the media input and output devices available.
|
|
2429
2468
|
*
|
|
2430
2469
|
* @param deviceKind - Optional filter to return a specific device kind.
|
|
@@ -17466,7 +17505,7 @@ var STATS_DEFAULT = {
|
|
|
17466
17505
|
}
|
|
17467
17506
|
};
|
|
17468
17507
|
var DEFAULT_GET_STATS_FILTER = {
|
|
17469
|
-
types: ['track', 'transport', 'candidate-pair', 'outbound-rtp', 'outboundrtp', 'inbound-rtp', 'inboundrtp', 'remote-inbound-rtp', 'remote-outbound-rtp', 'remote-candidate', 'local-candidate', 'media-source']
|
|
17508
|
+
types: ['codec', 'track', 'transport', 'candidate-pair', 'outbound-rtp', 'outboundrtp', 'inbound-rtp', 'inboundrtp', 'remote-inbound-rtp', 'remote-outbound-rtp', 'remote-candidate', 'local-candidate', 'media-source']
|
|
17470
17509
|
};
|
|
17471
17510
|
var MQA_INTERVAL = 60000;
|
|
17472
17511
|
var _UNKNOWN_ = 'UNKNOWN';
|
|
@@ -17771,6 +17810,19 @@ var getTotalValueFromBaseType = (stats, sendrecvType, baseMediaType, value) => O
|
|
|
17771
17810
|
var _stats$mt, _stats$mt$sendrecvTyp;
|
|
17772
17811
|
return acc + (((_stats$mt = stats[mt]) === null || _stats$mt === void 0 ? void 0 : (_stats$mt$sendrecvTyp = _stats$mt[sendrecvType]) === null || _stats$mt$sendrecvTyp === void 0 ? void 0 : _stats$mt$sendrecvTyp[value]) || 0);
|
|
17773
17812
|
}, 0);
|
|
17813
|
+
var samplesToMilliseconds = (samples, clockRate) => {
|
|
17814
|
+
return samples / clockRate * 1000;
|
|
17815
|
+
};
|
|
17816
|
+
var calculateAudioReceiverConcealedFrames = (statsResults, mediaType, lastConcealedSamples, lastSilentConcealedSamples) => {
|
|
17817
|
+
var {
|
|
17818
|
+
concealedSamples,
|
|
17819
|
+
silentConcealedSamples
|
|
17820
|
+
} = statsResults[mediaType][MediaDirection.RECEIVE];
|
|
17821
|
+
var clockRate = statsResults[mediaType][MediaDirection.RECEIVE].clockRate;
|
|
17822
|
+
var concealedSamplesDelta = concealedSamples - lastConcealedSamples;
|
|
17823
|
+
var silentConcealedSamplesDelta = silentConcealedSamples - lastSilentConcealedSamples;
|
|
17824
|
+
return samplesToMilliseconds(concealedSamplesDelta - silentConcealedSamplesDelta, clockRate);
|
|
17825
|
+
};
|
|
17774
17826
|
var getAudioReceiverMqa = _ref => {
|
|
17775
17827
|
var {
|
|
17776
17828
|
audioReceiver,
|
|
@@ -17812,7 +17864,7 @@ var getAudioReceiverMqa = _ref => {
|
|
|
17812
17864
|
audioReceiver.common.rtpBitrate = (totalBytesReceived - lastBytesReceived) * 8 / 60 || 0;
|
|
17813
17865
|
};
|
|
17814
17866
|
var getAudioReceiverStreamMqa = _ref2 => {
|
|
17815
|
-
var _lastMqaDataSent$medi, _lastMqaDataSent$medi2, _lastMqaDataSent$medi3, _lastMqaDataSent$medi4, _lastMqaDataSent$medi5, _lastMqaDataSent$medi6, _lastMqaDataSent$medi7, _lastMqaDataSent$medi8, _statsResults$mediaTy2, _statsResults$mediaTy3;
|
|
17867
|
+
var _lastMqaDataSent$medi, _lastMqaDataSent$medi2, _lastMqaDataSent$medi3, _lastMqaDataSent$medi4, _lastMqaDataSent$medi5, _lastMqaDataSent$medi6, _lastMqaDataSent$medi7, _lastMqaDataSent$medi8, _lastMqaDataSent$medi9, _statsResults$mediaTy2, _statsResults$mediaTy3;
|
|
17816
17868
|
var {
|
|
17817
17869
|
audioReceiverStream,
|
|
17818
17870
|
statsResults,
|
|
@@ -17823,11 +17875,12 @@ var getAudioReceiverStreamMqa = _ref2 => {
|
|
|
17823
17875
|
var lastPacketsDecoded = ((_lastMqaDataSent$medi = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi === void 0 ? void 0 : _lastMqaDataSent$medi[sendrecvType].totalSamplesDecoded) || 0;
|
|
17824
17876
|
var lastSamplesReceived = ((_lastMqaDataSent$medi2 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi2 === void 0 ? void 0 : _lastMqaDataSent$medi2[sendrecvType].totalSamplesReceived) || 0;
|
|
17825
17877
|
var lastConcealedSamples = ((_lastMqaDataSent$medi3 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi3 === void 0 ? void 0 : _lastMqaDataSent$medi3[sendrecvType].concealedSamples) || 0;
|
|
17826
|
-
var
|
|
17827
|
-
var
|
|
17828
|
-
var
|
|
17829
|
-
var
|
|
17830
|
-
var
|
|
17878
|
+
var lastSilentConcealedSamples = ((_lastMqaDataSent$medi4 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi4 === void 0 ? void 0 : _lastMqaDataSent$medi4[sendrecvType].silentConcealedSamples) || 0;
|
|
17879
|
+
var lastBytesReceived = ((_lastMqaDataSent$medi5 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi5 === void 0 ? void 0 : _lastMqaDataSent$medi5[sendrecvType].totalBytesReceived) || 0;
|
|
17880
|
+
var lastFecPacketsReceived = ((_lastMqaDataSent$medi6 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi6 === void 0 ? void 0 : _lastMqaDataSent$medi6[sendrecvType].fecPacketsReceived) || 0;
|
|
17881
|
+
var lastFecPacketsDiscarded = ((_lastMqaDataSent$medi7 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi7 === void 0 ? void 0 : _lastMqaDataSent$medi7[sendrecvType].fecPacketsDiscarded) || 0;
|
|
17882
|
+
var lastPacketsReceived = ((_lastMqaDataSent$medi8 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi8 === void 0 ? void 0 : _lastMqaDataSent$medi8[sendrecvType].totalPacketsReceived) || 0;
|
|
17883
|
+
var lastPacketsLost = ((_lastMqaDataSent$medi9 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi9 === void 0 ? void 0 : _lastMqaDataSent$medi9[sendrecvType].totalPacketsLost) || 0;
|
|
17831
17884
|
var {
|
|
17832
17885
|
csi
|
|
17833
17886
|
} = statsResults[mediaType];
|
|
@@ -17842,7 +17895,7 @@ var getAudioReceiverStreamMqa = _ref2 => {
|
|
|
17842
17895
|
audioReceiverStream.common.framesDropped = statsResults[mediaType][sendrecvType].totalSamplesDecoded - lastPacketsDecoded || 0;
|
|
17843
17896
|
audioReceiverStream.common.renderedFrameRate = audioReceiverStream.common.framesDropped * 100 / 60 || 0;
|
|
17844
17897
|
audioReceiverStream.common.framesReceived = statsResults[mediaType][sendrecvType].totalSamplesReceived - lastSamplesReceived || 0;
|
|
17845
|
-
audioReceiverStream.common.concealedFrames = statsResults
|
|
17898
|
+
audioReceiverStream.common.concealedFrames = calculateAudioReceiverConcealedFrames(statsResults, mediaType, lastConcealedSamples, lastSilentConcealedSamples);
|
|
17846
17899
|
audioReceiverStream.common.receivedBitrate = (statsResults[mediaType][sendrecvType].totalBytesReceived - lastBytesReceived) * 8 / 60 || 0;
|
|
17847
17900
|
audioReceiverStream.common.requestedBitrate = (_statsResults$mediaTy2 = statsResults[mediaType][sendrecvType].requestedBitrate) !== null && _statsResults$mediaTy2 !== void 0 ? _statsResults$mediaTy2 : -1;
|
|
17848
17901
|
audioReceiverStream.common.requestedFrameRate = (_statsResults$mediaTy3 = statsResults[mediaType][sendrecvType].requestedFrameRate) !== null && _statsResults$mediaTy3 !== void 0 ? _statsResults$mediaTy3 : -1;
|
|
@@ -17887,7 +17940,7 @@ var getAudioSenderMqa = _ref3 => {
|
|
|
17887
17940
|
audioSender.common.rtpBitrate = totalBytesSentInaMin ? totalBytesSentInaMin * 8 / 60 : 0;
|
|
17888
17941
|
};
|
|
17889
17942
|
var getAudioSenderStreamMqa = _ref4 => {
|
|
17890
|
-
var _lastMqaDataSent$
|
|
17943
|
+
var _lastMqaDataSent$medi10, _lastMqaDataSent$medi11, _lastMqaDataSent$medi12, _lastMqaDataSent$medi13, _statsResults$mediaTy5, _statsResults$mediaTy6;
|
|
17891
17944
|
var {
|
|
17892
17945
|
audioSenderStream,
|
|
17893
17946
|
statsResults,
|
|
@@ -17895,10 +17948,10 @@ var getAudioSenderStreamMqa = _ref4 => {
|
|
|
17895
17948
|
mediaType
|
|
17896
17949
|
} = _ref4;
|
|
17897
17950
|
var sendrecvType = MediaDirection.SEND;
|
|
17898
|
-
var lastBytesSent = ((_lastMqaDataSent$
|
|
17899
|
-
var lastFramesEncoded = ((_lastMqaDataSent$
|
|
17900
|
-
var lastFirCount = ((_lastMqaDataSent$
|
|
17901
|
-
var lastPacketsSent = ((_lastMqaDataSent$
|
|
17951
|
+
var lastBytesSent = ((_lastMqaDataSent$medi10 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi10 === void 0 ? void 0 : _lastMqaDataSent$medi10[sendrecvType].totalBytesSent) || 0;
|
|
17952
|
+
var lastFramesEncoded = ((_lastMqaDataSent$medi11 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi11 === void 0 ? void 0 : _lastMqaDataSent$medi11[sendrecvType].totalKeyFramesEncoded) || 0;
|
|
17953
|
+
var lastFirCount = ((_lastMqaDataSent$medi12 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi12 === void 0 ? void 0 : _lastMqaDataSent$medi12[sendrecvType].totalFirCount) || 0;
|
|
17954
|
+
var lastPacketsSent = ((_lastMqaDataSent$medi13 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi13 === void 0 ? void 0 : _lastMqaDataSent$medi13[sendrecvType].totalPacketsSent) || 0;
|
|
17902
17955
|
var {
|
|
17903
17956
|
csi
|
|
17904
17957
|
} = statsResults[mediaType];
|
|
@@ -17960,7 +18013,7 @@ var getVideoReceiverMqa = _ref5 => {
|
|
|
17960
18013
|
videoReceiver.common.rtxBitrate = totalRtxBytesReceivedInaMin ? totalRtxBytesReceivedInaMin * 8 / 60 : 0;
|
|
17961
18014
|
};
|
|
17962
18015
|
var getVideoReceiverStreamMqa = _ref6 => {
|
|
17963
|
-
var _lastMqaDataSent$
|
|
18016
|
+
var _lastMqaDataSent$medi14, _lastMqaDataSent$medi15, _lastMqaDataSent$medi16, _lastMqaDataSent$medi17, _lastMqaDataSent$medi18, _lastMqaDataSent$medi19, _lastMqaDataSent$medi20, _lastMqaDataSent$medi21, _statsResults$mediaTy8, _statsResults$mediaTy9, _statsResults$mediaTy10, _statsResults$mediaTy11, _statsResults$mediaTy12;
|
|
17964
18017
|
var {
|
|
17965
18018
|
videoReceiverStream,
|
|
17966
18019
|
statsResults,
|
|
@@ -17968,14 +18021,14 @@ var getVideoReceiverStreamMqa = _ref6 => {
|
|
|
17968
18021
|
mediaType
|
|
17969
18022
|
} = _ref6;
|
|
17970
18023
|
var sendrecvType = MediaDirection.RECEIVE;
|
|
17971
|
-
var lastPacketsReceived = ((_lastMqaDataSent$
|
|
17972
|
-
var lastPacketsLost = ((_lastMqaDataSent$
|
|
17973
|
-
var lastBytesReceived = ((_lastMqaDataSent$
|
|
17974
|
-
var lastFramesReceived = ((_lastMqaDataSent$
|
|
17975
|
-
var lastFramesDecoded = ((_lastMqaDataSent$
|
|
17976
|
-
var lastFramesDropped = ((_lastMqaDataSent$
|
|
17977
|
-
var lastKeyFramesDecoded = ((_lastMqaDataSent$
|
|
17978
|
-
var lastPliCount = ((_lastMqaDataSent$
|
|
18024
|
+
var lastPacketsReceived = ((_lastMqaDataSent$medi14 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi14 === void 0 ? void 0 : _lastMqaDataSent$medi14[sendrecvType].totalPacketsReceived) || 0;
|
|
18025
|
+
var lastPacketsLost = ((_lastMqaDataSent$medi15 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi15 === void 0 ? void 0 : _lastMqaDataSent$medi15[sendrecvType].totalPacketsLost) || 0;
|
|
18026
|
+
var lastBytesReceived = ((_lastMqaDataSent$medi16 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi16 === void 0 ? void 0 : _lastMqaDataSent$medi16[sendrecvType].totalBytesReceived) || 0;
|
|
18027
|
+
var lastFramesReceived = ((_lastMqaDataSent$medi17 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi17 === void 0 ? void 0 : _lastMqaDataSent$medi17[sendrecvType].framesReceived) || 0;
|
|
18028
|
+
var lastFramesDecoded = ((_lastMqaDataSent$medi18 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi18 === void 0 ? void 0 : _lastMqaDataSent$medi18[sendrecvType].framesDecoded) || 0;
|
|
18029
|
+
var lastFramesDropped = ((_lastMqaDataSent$medi19 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi19 === void 0 ? void 0 : _lastMqaDataSent$medi19[sendrecvType].framesDropped) || 0;
|
|
18030
|
+
var lastKeyFramesDecoded = ((_lastMqaDataSent$medi20 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi20 === void 0 ? void 0 : _lastMqaDataSent$medi20[sendrecvType].keyFramesDecoded) || 0;
|
|
18031
|
+
var lastPliCount = ((_lastMqaDataSent$medi21 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi21 === void 0 ? void 0 : _lastMqaDataSent$medi21[sendrecvType].totalPliCount) || 0;
|
|
17979
18032
|
var {
|
|
17980
18033
|
csi
|
|
17981
18034
|
} = statsResults[mediaType];
|
|
@@ -18053,7 +18106,7 @@ var getVideoSenderMqa = _ref7 => {
|
|
|
18053
18106
|
videoSender.common.rtxBitrate = totalRtxBytesSentInaMin ? totalRtxBytesSentInaMin * 8 / 60 : 0;
|
|
18054
18107
|
};
|
|
18055
18108
|
var getVideoSenderStreamMqa = _ref8 => {
|
|
18056
|
-
var _lastMqaDataSent$
|
|
18109
|
+
var _lastMqaDataSent$medi22, _lastMqaDataSent$medi23, _lastMqaDataSent$medi24, _lastMqaDataSent$medi25, _lastMqaDataSent$medi26, _statsResults$mediaTy14, _statsResults$mediaTy15, _statsResults$mediaTy16;
|
|
18057
18110
|
var {
|
|
18058
18111
|
videoSenderStream,
|
|
18059
18112
|
statsResults,
|
|
@@ -18061,11 +18114,11 @@ var getVideoSenderStreamMqa = _ref8 => {
|
|
|
18061
18114
|
mediaType
|
|
18062
18115
|
} = _ref8;
|
|
18063
18116
|
var sendrecvType = MediaDirection.SEND;
|
|
18064
|
-
var lastPacketsSent = ((_lastMqaDataSent$
|
|
18065
|
-
var lastBytesSent = ((_lastMqaDataSent$
|
|
18066
|
-
var lastKeyFramesEncoded = ((_lastMqaDataSent$
|
|
18067
|
-
var lastFirCount = ((_lastMqaDataSent$
|
|
18068
|
-
var lastFramesSent = ((_lastMqaDataSent$
|
|
18117
|
+
var lastPacketsSent = ((_lastMqaDataSent$medi22 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi22 === void 0 ? void 0 : _lastMqaDataSent$medi22[sendrecvType].totalPacketsSent) || 0;
|
|
18118
|
+
var lastBytesSent = ((_lastMqaDataSent$medi23 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi23 === void 0 ? void 0 : _lastMqaDataSent$medi23[sendrecvType].totalBytesSent) || 0;
|
|
18119
|
+
var lastKeyFramesEncoded = ((_lastMqaDataSent$medi24 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi24 === void 0 ? void 0 : _lastMqaDataSent$medi24[sendrecvType].totalKeyFramesEncoded) || 0;
|
|
18120
|
+
var lastFirCount = ((_lastMqaDataSent$medi25 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi25 === void 0 ? void 0 : _lastMqaDataSent$medi25[sendrecvType].totalFirCount) || 0;
|
|
18121
|
+
var lastFramesSent = ((_lastMqaDataSent$medi26 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi26 === void 0 ? void 0 : _lastMqaDataSent$medi26[sendrecvType].framesSent) || 0;
|
|
18069
18122
|
var {
|
|
18070
18123
|
csi
|
|
18071
18124
|
} = statsResults[mediaType];
|
|
@@ -18598,6 +18651,9 @@ class StatsAnalyzer extends EventEmitter$5 {
|
|
|
18598
18651
|
case 'media-source':
|
|
18599
18652
|
this.parseAudioSource(getStatsResult, type);
|
|
18600
18653
|
break;
|
|
18654
|
+
case 'codec':
|
|
18655
|
+
this.parseCodec(getStatsResult, type);
|
|
18656
|
+
break;
|
|
18601
18657
|
}
|
|
18602
18658
|
}
|
|
18603
18659
|
filterAndParseGetStatsResults(statsItem, type, isSender) {
|
|
@@ -18647,6 +18703,12 @@ class StatsAnalyzer extends EventEmitter$5 {
|
|
|
18647
18703
|
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
18648
18704
|
}
|
|
18649
18705
|
}
|
|
18706
|
+
parseCodec(result, type) {
|
|
18707
|
+
var sendRecvType = MediaDirection.RECEIVE;
|
|
18708
|
+
if (type.includes('audio-recv')) {
|
|
18709
|
+
this.statsResults[type][sendRecvType].clockRate = result.clockRate;
|
|
18710
|
+
}
|
|
18711
|
+
}
|
|
18650
18712
|
compareLastStatsResult() {
|
|
18651
18713
|
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
18652
18714
|
var getCurrentStatsTotals = (keyPrefix, value) => Object.keys(this.statsResults).filter(key => key.startsWith(keyPrefix)).reduce((prev, cur) => {
|
|
@@ -18880,6 +18942,7 @@ class StatsAnalyzer extends EventEmitter$5 {
|
|
|
18880
18942
|
this.statsResults[mediaType][sendrecvType].totalSamplesReceived = result.totalSamplesReceived || 0;
|
|
18881
18943
|
this.statsResults[mediaType][sendrecvType].totalSamplesDecoded = result.totalSamplesDecoded || 0;
|
|
18882
18944
|
this.statsResults[mediaType][sendrecvType].concealedSamples = result.concealedSamples || 0;
|
|
18945
|
+
this.statsResults[mediaType][sendrecvType].silentConcealedSamples = result.silentConcealedSamples || 0;
|
|
18883
18946
|
this.statsResults[mediaType][sendrecvType].isRequested = result.isRequested;
|
|
18884
18947
|
this.statsResults[mediaType][sendrecvType].lastRequestedUpdateTimestamp = result.lastRequestedUpdateTimestamp;
|
|
18885
18948
|
}
|
|
@@ -19052,7 +19115,9 @@ exports.StatsAnalyzer = StatsAnalyzer;
|
|
|
19052
19115
|
exports.StreamRequest = StreamRequest;
|
|
19053
19116
|
exports.WcmeError = WcmeError;
|
|
19054
19117
|
exports.configureWcmeLogger = configureWcmeLogger;
|
|
19118
|
+
exports.createCameraAndMicrophoneStreams = createCameraAndMicrophoneStreams;
|
|
19055
19119
|
exports.createCameraStream = createCameraStream;
|
|
19120
|
+
exports.createDisplayMedia = createDisplayMedia;
|
|
19056
19121
|
exports.createDisplayStream = createDisplayStream;
|
|
19057
19122
|
exports.createDisplayStreamWithAudio = createDisplayStreamWithAudio;
|
|
19058
19123
|
exports.createMicrophoneStream = createMicrophoneStream;
|
package/dist/esm/index.js
CHANGED
|
@@ -2331,10 +2331,11 @@ if(module.exports){module.exports=Logger;}else {Logger._prevLogger=global.Logger
|
|
|
2331
2331
|
* media has successfully been obtained.
|
|
2332
2332
|
*/function getUserMedia(constraints){return __awaiter$2(this,void 0,void 0,function*(){return navigator.mediaDevices.getUserMedia(constraints);});}/**
|
|
2333
2333
|
* Prompts the user for permission to use a user's display media and audio. If a video track is
|
|
2334
|
-
* absent from the constraints argument, one will still be provided.
|
|
2334
|
+
* absent from the constraints argument, one will still be provided. Includes experimental options
|
|
2335
|
+
* found in https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#options.
|
|
2335
2336
|
*
|
|
2336
2337
|
* @param constraints - A MediaStreamConstraints object specifying the types of media to request,
|
|
2337
|
-
* along with any requirements for each type.
|
|
2338
|
+
* along with any requirements for each type, as well as experimental options.
|
|
2338
2339
|
* @returns A Promise whose fulfillment handler receives a MediaStream object when the requested
|
|
2339
2340
|
* media has successfully been obtained.
|
|
2340
2341
|
*/function getDisplayMedia(constraints){return navigator.mediaDevices.getDisplayMedia(constraints);}/**
|
|
@@ -2387,22 +2388,62 @@ stream.getTracks().forEach(track=>track.stop());return callbackRes;}return callb
|
|
|
2387
2388
|
* 1. Previous captured video stream from the same device is not stopped.
|
|
2388
2389
|
* 2. Previous createCameraStream() call for the same device is in progress.
|
|
2389
2390
|
*
|
|
2390
|
-
* @param
|
|
2391
|
+
* @param cameraStreamConstructor - Constructor for the local camera stream.
|
|
2391
2392
|
* @param constraints - Video device constraints.
|
|
2392
2393
|
* @returns A LocalCameraStream object or an error.
|
|
2393
|
-
*/function createCameraStream(
|
|
2394
|
+
*/function createCameraStream(cameraStreamConstructor,constraints){return __awaiter$2(this,void 0,void 0,function*(){var stream;try{stream=yield getUserMedia({video:Object.assign({},constraints)});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create camera stream: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2395
|
+
return new cameraStreamConstructor(stream);});}/**
|
|
2394
2396
|
* Creates a LocalMicrophoneStream with the given constraints.
|
|
2395
2397
|
*
|
|
2396
|
-
* @param
|
|
2398
|
+
* @param microphoneStreamConstructor - Constructor for the local microphone stream.
|
|
2397
2399
|
* @param constraints - Audio device constraints.
|
|
2398
2400
|
* @returns A LocalMicrophoneStream object or an error.
|
|
2399
|
-
*/function createMicrophoneStream(
|
|
2401
|
+
*/function createMicrophoneStream(microphoneStreamConstructor,constraints){return __awaiter$2(this,void 0,void 0,function*(){var stream;try{stream=yield getUserMedia({audio:Object.assign({},constraints)});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create microphone stream: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2402
|
+
return new microphoneStreamConstructor(stream);});}/**
|
|
2403
|
+
* Creates a LocalCameraStream and a LocalMicrophoneStream with the given constraints.
|
|
2404
|
+
*
|
|
2405
|
+
* @param cameraStreamConstructor - Constructor for the local camera stream.
|
|
2406
|
+
* @param microphoneStreamConstructor - Constructor for the local microphone stream.
|
|
2407
|
+
* @param constraints - Object containing video and audio device constraints.
|
|
2408
|
+
* @param constraints.video - Video device constraints.
|
|
2409
|
+
* @param constraints.audio - Audio device constraints.
|
|
2410
|
+
* @returns A Promise that resolves to a LocalCameraStream and a LocalMicrophoneStream or an error.
|
|
2411
|
+
*/function createCameraAndMicrophoneStreams(cameraStreamConstructor,microphoneStreamConstructor,constraints){return __awaiter$2(this,void 0,void 0,function*(){var stream;try{stream=yield getUserMedia({video:Object.assign({},constraints===null||constraints===void 0?void 0:constraints.video),audio:Object.assign({},constraints===null||constraints===void 0?void 0:constraints.audio)});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create camera and microphone streams: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2412
|
+
var localCameraStream=new cameraStreamConstructor(new MediaStream(stream.getVideoTracks()));// eslint-disable-next-line new-cap
|
|
2413
|
+
var localMicrophoneStream=new microphoneStreamConstructor(new MediaStream(stream.getAudioTracks()));return [localCameraStream,localMicrophoneStream];});}/**
|
|
2414
|
+
* Creates a LocalDisplayStream and a LocalSystemAudioStream with the given parameters.
|
|
2415
|
+
*
|
|
2416
|
+
* This is a more advanced version of createDisplayStreamWithAudio that allows the user to specify
|
|
2417
|
+
* additional display media options and constraints.
|
|
2418
|
+
*
|
|
2419
|
+
* See https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#options.
|
|
2420
|
+
*
|
|
2421
|
+
* @param options - An object containing the options for creating the display and system audio streams.
|
|
2422
|
+
* @param options.video - An object containing the video stream options.
|
|
2423
|
+
* @param options.video.displayStreamConstructor - Constructor for the local display stream.
|
|
2424
|
+
* @param options.video.constraints - Video device constraints.
|
|
2425
|
+
* @param options.video.videoContentHint - A hint for the content of the stream.
|
|
2426
|
+
* @param options.video.preferCurrentTab - Whether to offer the current tab as the most prominent capture source.
|
|
2427
|
+
* @param options.video.selfBrowserSurface - Whether to allow the user to select the current tab for capture.
|
|
2428
|
+
* @param options.video.surfaceSwitching - Whether to allow the user to dynamically switch the shared tab during screen-sharing.
|
|
2429
|
+
* @param options.video.monitorTypeSurfaces - Whether to offer the user the option to choose display surfaces whose type is monitor.
|
|
2430
|
+
* @param options.audio - An object containing the audio stream options. If present, a system audio stream will be created.
|
|
2431
|
+
* @param options.audio.systemAudioStreamConstructor - Constructor for the local system audio stream.
|
|
2432
|
+
* @param options.audio.constraints - Audio device constraints.
|
|
2433
|
+
* @param options.audio.systemAudio - Whether to include the system audio among the possible audio sources offered to the user.
|
|
2434
|
+
* @param options.controller - CaptureController to further manipulate the capture session.
|
|
2435
|
+
* @returns A Promise that resolves to a LocalDisplayStream and a LocalSystemAudioStream or an
|
|
2436
|
+
* error. If no system audio is available, the LocalSystemAudioStream will be resolved as null
|
|
2437
|
+
* instead.
|
|
2438
|
+
*/function createDisplayMedia(options){return __awaiter$2(this,void 0,void 0,function*(){var _a,_b;var stream;var videoConstraints=options.video.constraints||true;var audioConstraints=((_a=options.audio)===null||_a===void 0?void 0:_a.constraints)||!!options.audio;try{stream=yield getDisplayMedia({video:videoConstraints,audio:audioConstraints,controller:options.controller,preferCurrentTab:options.video.preferCurrentTab,selfBrowserSurface:options.video.selfBrowserSurface,surfaceSwitching:options.video.surfaceSwitching,systemAudio:(_b=options.audio)===null||_b===void 0?void 0:_b.systemAudio,monitorTypeSurfaces:options.video.monitorTypeSurfaces});}catch(error){throw new WebrtcCoreError(WebrtcCoreErrorType.CREATE_STREAM_FAILED,"Failed to create display and/or system audio streams: ".concat(error));}// eslint-disable-next-line new-cap
|
|
2439
|
+
var localDisplayStream=new options.video.displayStreamConstructor(new MediaStream(stream.getVideoTracks()));if(options.video.videoContentHint){localDisplayStream.contentHint=options.video.videoContentHint;}var localSystemAudioStream=null;if(options.audio&&stream.getAudioTracks().length>0){// eslint-disable-next-line new-cap
|
|
2440
|
+
localSystemAudioStream=new options.audio.systemAudioStreamConstructor(new MediaStream(stream.getAudioTracks()));}return [localDisplayStream,localSystemAudioStream];});}/**
|
|
2400
2441
|
* Creates a LocalDisplayStream with the given parameters.
|
|
2401
2442
|
*
|
|
2402
|
-
* @param
|
|
2443
|
+
* @param displayStreamConstructor - Constructor for the local display stream.
|
|
2403
2444
|
* @param videoContentHint - An optional parameter to give a hint for the content of the stream.
|
|
2404
2445
|
* @returns A Promise that resolves to a LocalDisplayStream or an error.
|
|
2405
|
-
*/function createDisplayStream(
|
|
2446
|
+
*/function createDisplayStream(displayStreamConstructor,videoContentHint){return __awaiter$2(this,void 0,void 0,function*(){var[localDisplayStream]=yield createDisplayMedia({video:{displayStreamConstructor,videoContentHint}});return localDisplayStream;});}/**
|
|
2406
2447
|
* Creates a LocalDisplayStream and a LocalSystemAudioStream with the given parameters.
|
|
2407
2448
|
*
|
|
2408
2449
|
* @param displayStreamConstructor - Constructor for the local display stream.
|
|
@@ -2411,9 +2452,7 @@ stream.getTracks().forEach(track=>track.stop());return callbackRes;}return callb
|
|
|
2411
2452
|
* @returns A Promise that resolves to a LocalDisplayStream and a LocalSystemAudioStream or an
|
|
2412
2453
|
* error. If no system audio is available, the LocalSystemAudioStream will be resolved as null
|
|
2413
2454
|
* instead.
|
|
2414
|
-
*/function createDisplayStreamWithAudio(displayStreamConstructor,systemAudioStreamConstructor,videoContentHint){return __awaiter$2(this,void 0,void 0,function*(){
|
|
2415
|
-
var localDisplayStream=new displayStreamConstructor(new MediaStream(stream.getVideoTracks()));if(videoContentHint){localDisplayStream.contentHint=videoContentHint;}var localSystemAudioStream=null;if(stream.getAudioTracks().length>0){// eslint-disable-next-line new-cap
|
|
2416
|
-
localSystemAudioStream=new systemAudioStreamConstructor(new MediaStream(stream.getAudioTracks()));}return [localDisplayStream,localSystemAudioStream];});}/**
|
|
2455
|
+
*/function createDisplayStreamWithAudio(displayStreamConstructor,systemAudioStreamConstructor,videoContentHint){return __awaiter$2(this,void 0,void 0,function*(){return createDisplayMedia({video:{displayStreamConstructor,videoContentHint},audio:{systemAudioStreamConstructor}});});}/**
|
|
2417
2456
|
* Enumerates the media input and output devices available.
|
|
2418
2457
|
*
|
|
2419
2458
|
* @param deviceKind - Optional filter to return a specific device kind.
|
|
@@ -17455,7 +17494,7 @@ var STATS_DEFAULT = {
|
|
|
17455
17494
|
}
|
|
17456
17495
|
};
|
|
17457
17496
|
var DEFAULT_GET_STATS_FILTER = {
|
|
17458
|
-
types: ['track', 'transport', 'candidate-pair', 'outbound-rtp', 'outboundrtp', 'inbound-rtp', 'inboundrtp', 'remote-inbound-rtp', 'remote-outbound-rtp', 'remote-candidate', 'local-candidate', 'media-source']
|
|
17497
|
+
types: ['codec', 'track', 'transport', 'candidate-pair', 'outbound-rtp', 'outboundrtp', 'inbound-rtp', 'inboundrtp', 'remote-inbound-rtp', 'remote-outbound-rtp', 'remote-candidate', 'local-candidate', 'media-source']
|
|
17459
17498
|
};
|
|
17460
17499
|
var MQA_INTERVAL = 60000;
|
|
17461
17500
|
var _UNKNOWN_ = 'UNKNOWN';
|
|
@@ -17760,6 +17799,19 @@ var getTotalValueFromBaseType = (stats, sendrecvType, baseMediaType, value) => O
|
|
|
17760
17799
|
var _stats$mt, _stats$mt$sendrecvTyp;
|
|
17761
17800
|
return acc + (((_stats$mt = stats[mt]) === null || _stats$mt === void 0 ? void 0 : (_stats$mt$sendrecvTyp = _stats$mt[sendrecvType]) === null || _stats$mt$sendrecvTyp === void 0 ? void 0 : _stats$mt$sendrecvTyp[value]) || 0);
|
|
17762
17801
|
}, 0);
|
|
17802
|
+
var samplesToMilliseconds = (samples, clockRate) => {
|
|
17803
|
+
return samples / clockRate * 1000;
|
|
17804
|
+
};
|
|
17805
|
+
var calculateAudioReceiverConcealedFrames = (statsResults, mediaType, lastConcealedSamples, lastSilentConcealedSamples) => {
|
|
17806
|
+
var {
|
|
17807
|
+
concealedSamples,
|
|
17808
|
+
silentConcealedSamples
|
|
17809
|
+
} = statsResults[mediaType][MediaDirection.RECEIVE];
|
|
17810
|
+
var clockRate = statsResults[mediaType][MediaDirection.RECEIVE].clockRate;
|
|
17811
|
+
var concealedSamplesDelta = concealedSamples - lastConcealedSamples;
|
|
17812
|
+
var silentConcealedSamplesDelta = silentConcealedSamples - lastSilentConcealedSamples;
|
|
17813
|
+
return samplesToMilliseconds(concealedSamplesDelta - silentConcealedSamplesDelta, clockRate);
|
|
17814
|
+
};
|
|
17763
17815
|
var getAudioReceiverMqa = _ref => {
|
|
17764
17816
|
var {
|
|
17765
17817
|
audioReceiver,
|
|
@@ -17801,7 +17853,7 @@ var getAudioReceiverMqa = _ref => {
|
|
|
17801
17853
|
audioReceiver.common.rtpBitrate = (totalBytesReceived - lastBytesReceived) * 8 / 60 || 0;
|
|
17802
17854
|
};
|
|
17803
17855
|
var getAudioReceiverStreamMqa = _ref2 => {
|
|
17804
|
-
var _lastMqaDataSent$medi, _lastMqaDataSent$medi2, _lastMqaDataSent$medi3, _lastMqaDataSent$medi4, _lastMqaDataSent$medi5, _lastMqaDataSent$medi6, _lastMqaDataSent$medi7, _lastMqaDataSent$medi8, _statsResults$mediaTy2, _statsResults$mediaTy3;
|
|
17856
|
+
var _lastMqaDataSent$medi, _lastMqaDataSent$medi2, _lastMqaDataSent$medi3, _lastMqaDataSent$medi4, _lastMqaDataSent$medi5, _lastMqaDataSent$medi6, _lastMqaDataSent$medi7, _lastMqaDataSent$medi8, _lastMqaDataSent$medi9, _statsResults$mediaTy2, _statsResults$mediaTy3;
|
|
17805
17857
|
var {
|
|
17806
17858
|
audioReceiverStream,
|
|
17807
17859
|
statsResults,
|
|
@@ -17812,11 +17864,12 @@ var getAudioReceiverStreamMqa = _ref2 => {
|
|
|
17812
17864
|
var lastPacketsDecoded = ((_lastMqaDataSent$medi = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi === void 0 ? void 0 : _lastMqaDataSent$medi[sendrecvType].totalSamplesDecoded) || 0;
|
|
17813
17865
|
var lastSamplesReceived = ((_lastMqaDataSent$medi2 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi2 === void 0 ? void 0 : _lastMqaDataSent$medi2[sendrecvType].totalSamplesReceived) || 0;
|
|
17814
17866
|
var lastConcealedSamples = ((_lastMqaDataSent$medi3 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi3 === void 0 ? void 0 : _lastMqaDataSent$medi3[sendrecvType].concealedSamples) || 0;
|
|
17815
|
-
var
|
|
17816
|
-
var
|
|
17817
|
-
var
|
|
17818
|
-
var
|
|
17819
|
-
var
|
|
17867
|
+
var lastSilentConcealedSamples = ((_lastMqaDataSent$medi4 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi4 === void 0 ? void 0 : _lastMqaDataSent$medi4[sendrecvType].silentConcealedSamples) || 0;
|
|
17868
|
+
var lastBytesReceived = ((_lastMqaDataSent$medi5 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi5 === void 0 ? void 0 : _lastMqaDataSent$medi5[sendrecvType].totalBytesReceived) || 0;
|
|
17869
|
+
var lastFecPacketsReceived = ((_lastMqaDataSent$medi6 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi6 === void 0 ? void 0 : _lastMqaDataSent$medi6[sendrecvType].fecPacketsReceived) || 0;
|
|
17870
|
+
var lastFecPacketsDiscarded = ((_lastMqaDataSent$medi7 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi7 === void 0 ? void 0 : _lastMqaDataSent$medi7[sendrecvType].fecPacketsDiscarded) || 0;
|
|
17871
|
+
var lastPacketsReceived = ((_lastMqaDataSent$medi8 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi8 === void 0 ? void 0 : _lastMqaDataSent$medi8[sendrecvType].totalPacketsReceived) || 0;
|
|
17872
|
+
var lastPacketsLost = ((_lastMqaDataSent$medi9 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi9 === void 0 ? void 0 : _lastMqaDataSent$medi9[sendrecvType].totalPacketsLost) || 0;
|
|
17820
17873
|
var {
|
|
17821
17874
|
csi
|
|
17822
17875
|
} = statsResults[mediaType];
|
|
@@ -17831,7 +17884,7 @@ var getAudioReceiverStreamMqa = _ref2 => {
|
|
|
17831
17884
|
audioReceiverStream.common.framesDropped = statsResults[mediaType][sendrecvType].totalSamplesDecoded - lastPacketsDecoded || 0;
|
|
17832
17885
|
audioReceiverStream.common.renderedFrameRate = audioReceiverStream.common.framesDropped * 100 / 60 || 0;
|
|
17833
17886
|
audioReceiverStream.common.framesReceived = statsResults[mediaType][sendrecvType].totalSamplesReceived - lastSamplesReceived || 0;
|
|
17834
|
-
audioReceiverStream.common.concealedFrames = statsResults
|
|
17887
|
+
audioReceiverStream.common.concealedFrames = calculateAudioReceiverConcealedFrames(statsResults, mediaType, lastConcealedSamples, lastSilentConcealedSamples);
|
|
17835
17888
|
audioReceiverStream.common.receivedBitrate = (statsResults[mediaType][sendrecvType].totalBytesReceived - lastBytesReceived) * 8 / 60 || 0;
|
|
17836
17889
|
audioReceiverStream.common.requestedBitrate = (_statsResults$mediaTy2 = statsResults[mediaType][sendrecvType].requestedBitrate) !== null && _statsResults$mediaTy2 !== void 0 ? _statsResults$mediaTy2 : -1;
|
|
17837
17890
|
audioReceiverStream.common.requestedFrameRate = (_statsResults$mediaTy3 = statsResults[mediaType][sendrecvType].requestedFrameRate) !== null && _statsResults$mediaTy3 !== void 0 ? _statsResults$mediaTy3 : -1;
|
|
@@ -17876,7 +17929,7 @@ var getAudioSenderMqa = _ref3 => {
|
|
|
17876
17929
|
audioSender.common.rtpBitrate = totalBytesSentInaMin ? totalBytesSentInaMin * 8 / 60 : 0;
|
|
17877
17930
|
};
|
|
17878
17931
|
var getAudioSenderStreamMqa = _ref4 => {
|
|
17879
|
-
var _lastMqaDataSent$
|
|
17932
|
+
var _lastMqaDataSent$medi10, _lastMqaDataSent$medi11, _lastMqaDataSent$medi12, _lastMqaDataSent$medi13, _statsResults$mediaTy5, _statsResults$mediaTy6;
|
|
17880
17933
|
var {
|
|
17881
17934
|
audioSenderStream,
|
|
17882
17935
|
statsResults,
|
|
@@ -17884,10 +17937,10 @@ var getAudioSenderStreamMqa = _ref4 => {
|
|
|
17884
17937
|
mediaType
|
|
17885
17938
|
} = _ref4;
|
|
17886
17939
|
var sendrecvType = MediaDirection.SEND;
|
|
17887
|
-
var lastBytesSent = ((_lastMqaDataSent$
|
|
17888
|
-
var lastFramesEncoded = ((_lastMqaDataSent$
|
|
17889
|
-
var lastFirCount = ((_lastMqaDataSent$
|
|
17890
|
-
var lastPacketsSent = ((_lastMqaDataSent$
|
|
17940
|
+
var lastBytesSent = ((_lastMqaDataSent$medi10 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi10 === void 0 ? void 0 : _lastMqaDataSent$medi10[sendrecvType].totalBytesSent) || 0;
|
|
17941
|
+
var lastFramesEncoded = ((_lastMqaDataSent$medi11 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi11 === void 0 ? void 0 : _lastMqaDataSent$medi11[sendrecvType].totalKeyFramesEncoded) || 0;
|
|
17942
|
+
var lastFirCount = ((_lastMqaDataSent$medi12 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi12 === void 0 ? void 0 : _lastMqaDataSent$medi12[sendrecvType].totalFirCount) || 0;
|
|
17943
|
+
var lastPacketsSent = ((_lastMqaDataSent$medi13 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi13 === void 0 ? void 0 : _lastMqaDataSent$medi13[sendrecvType].totalPacketsSent) || 0;
|
|
17891
17944
|
var {
|
|
17892
17945
|
csi
|
|
17893
17946
|
} = statsResults[mediaType];
|
|
@@ -17949,7 +18002,7 @@ var getVideoReceiverMqa = _ref5 => {
|
|
|
17949
18002
|
videoReceiver.common.rtxBitrate = totalRtxBytesReceivedInaMin ? totalRtxBytesReceivedInaMin * 8 / 60 : 0;
|
|
17950
18003
|
};
|
|
17951
18004
|
var getVideoReceiverStreamMqa = _ref6 => {
|
|
17952
|
-
var _lastMqaDataSent$
|
|
18005
|
+
var _lastMqaDataSent$medi14, _lastMqaDataSent$medi15, _lastMqaDataSent$medi16, _lastMqaDataSent$medi17, _lastMqaDataSent$medi18, _lastMqaDataSent$medi19, _lastMqaDataSent$medi20, _lastMqaDataSent$medi21, _statsResults$mediaTy8, _statsResults$mediaTy9, _statsResults$mediaTy10, _statsResults$mediaTy11, _statsResults$mediaTy12;
|
|
17953
18006
|
var {
|
|
17954
18007
|
videoReceiverStream,
|
|
17955
18008
|
statsResults,
|
|
@@ -17957,14 +18010,14 @@ var getVideoReceiverStreamMqa = _ref6 => {
|
|
|
17957
18010
|
mediaType
|
|
17958
18011
|
} = _ref6;
|
|
17959
18012
|
var sendrecvType = MediaDirection.RECEIVE;
|
|
17960
|
-
var lastPacketsReceived = ((_lastMqaDataSent$
|
|
17961
|
-
var lastPacketsLost = ((_lastMqaDataSent$
|
|
17962
|
-
var lastBytesReceived = ((_lastMqaDataSent$
|
|
17963
|
-
var lastFramesReceived = ((_lastMqaDataSent$
|
|
17964
|
-
var lastFramesDecoded = ((_lastMqaDataSent$
|
|
17965
|
-
var lastFramesDropped = ((_lastMqaDataSent$
|
|
17966
|
-
var lastKeyFramesDecoded = ((_lastMqaDataSent$
|
|
17967
|
-
var lastPliCount = ((_lastMqaDataSent$
|
|
18013
|
+
var lastPacketsReceived = ((_lastMqaDataSent$medi14 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi14 === void 0 ? void 0 : _lastMqaDataSent$medi14[sendrecvType].totalPacketsReceived) || 0;
|
|
18014
|
+
var lastPacketsLost = ((_lastMqaDataSent$medi15 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi15 === void 0 ? void 0 : _lastMqaDataSent$medi15[sendrecvType].totalPacketsLost) || 0;
|
|
18015
|
+
var lastBytesReceived = ((_lastMqaDataSent$medi16 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi16 === void 0 ? void 0 : _lastMqaDataSent$medi16[sendrecvType].totalBytesReceived) || 0;
|
|
18016
|
+
var lastFramesReceived = ((_lastMqaDataSent$medi17 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi17 === void 0 ? void 0 : _lastMqaDataSent$medi17[sendrecvType].framesReceived) || 0;
|
|
18017
|
+
var lastFramesDecoded = ((_lastMqaDataSent$medi18 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi18 === void 0 ? void 0 : _lastMqaDataSent$medi18[sendrecvType].framesDecoded) || 0;
|
|
18018
|
+
var lastFramesDropped = ((_lastMqaDataSent$medi19 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi19 === void 0 ? void 0 : _lastMqaDataSent$medi19[sendrecvType].framesDropped) || 0;
|
|
18019
|
+
var lastKeyFramesDecoded = ((_lastMqaDataSent$medi20 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi20 === void 0 ? void 0 : _lastMqaDataSent$medi20[sendrecvType].keyFramesDecoded) || 0;
|
|
18020
|
+
var lastPliCount = ((_lastMqaDataSent$medi21 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi21 === void 0 ? void 0 : _lastMqaDataSent$medi21[sendrecvType].totalPliCount) || 0;
|
|
17968
18021
|
var {
|
|
17969
18022
|
csi
|
|
17970
18023
|
} = statsResults[mediaType];
|
|
@@ -18042,7 +18095,7 @@ var getVideoSenderMqa = _ref7 => {
|
|
|
18042
18095
|
videoSender.common.rtxBitrate = totalRtxBytesSentInaMin ? totalRtxBytesSentInaMin * 8 / 60 : 0;
|
|
18043
18096
|
};
|
|
18044
18097
|
var getVideoSenderStreamMqa = _ref8 => {
|
|
18045
|
-
var _lastMqaDataSent$
|
|
18098
|
+
var _lastMqaDataSent$medi22, _lastMqaDataSent$medi23, _lastMqaDataSent$medi24, _lastMqaDataSent$medi25, _lastMqaDataSent$medi26, _statsResults$mediaTy14, _statsResults$mediaTy15, _statsResults$mediaTy16;
|
|
18046
18099
|
var {
|
|
18047
18100
|
videoSenderStream,
|
|
18048
18101
|
statsResults,
|
|
@@ -18050,11 +18103,11 @@ var getVideoSenderStreamMqa = _ref8 => {
|
|
|
18050
18103
|
mediaType
|
|
18051
18104
|
} = _ref8;
|
|
18052
18105
|
var sendrecvType = MediaDirection.SEND;
|
|
18053
|
-
var lastPacketsSent = ((_lastMqaDataSent$
|
|
18054
|
-
var lastBytesSent = ((_lastMqaDataSent$
|
|
18055
|
-
var lastKeyFramesEncoded = ((_lastMqaDataSent$
|
|
18056
|
-
var lastFirCount = ((_lastMqaDataSent$
|
|
18057
|
-
var lastFramesSent = ((_lastMqaDataSent$
|
|
18106
|
+
var lastPacketsSent = ((_lastMqaDataSent$medi22 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi22 === void 0 ? void 0 : _lastMqaDataSent$medi22[sendrecvType].totalPacketsSent) || 0;
|
|
18107
|
+
var lastBytesSent = ((_lastMqaDataSent$medi23 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi23 === void 0 ? void 0 : _lastMqaDataSent$medi23[sendrecvType].totalBytesSent) || 0;
|
|
18108
|
+
var lastKeyFramesEncoded = ((_lastMqaDataSent$medi24 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi24 === void 0 ? void 0 : _lastMqaDataSent$medi24[sendrecvType].totalKeyFramesEncoded) || 0;
|
|
18109
|
+
var lastFirCount = ((_lastMqaDataSent$medi25 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi25 === void 0 ? void 0 : _lastMqaDataSent$medi25[sendrecvType].totalFirCount) || 0;
|
|
18110
|
+
var lastFramesSent = ((_lastMqaDataSent$medi26 = lastMqaDataSent[mediaType]) === null || _lastMqaDataSent$medi26 === void 0 ? void 0 : _lastMqaDataSent$medi26[sendrecvType].framesSent) || 0;
|
|
18058
18111
|
var {
|
|
18059
18112
|
csi
|
|
18060
18113
|
} = statsResults[mediaType];
|
|
@@ -18587,6 +18640,9 @@ class StatsAnalyzer extends EventEmitter$5 {
|
|
|
18587
18640
|
case 'media-source':
|
|
18588
18641
|
this.parseAudioSource(getStatsResult, type);
|
|
18589
18642
|
break;
|
|
18643
|
+
case 'codec':
|
|
18644
|
+
this.parseCodec(getStatsResult, type);
|
|
18645
|
+
break;
|
|
18590
18646
|
}
|
|
18591
18647
|
}
|
|
18592
18648
|
filterAndParseGetStatsResults(statsItem, type, isSender) {
|
|
@@ -18636,6 +18692,12 @@ class StatsAnalyzer extends EventEmitter$5 {
|
|
|
18636
18692
|
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
18637
18693
|
}
|
|
18638
18694
|
}
|
|
18695
|
+
parseCodec(result, type) {
|
|
18696
|
+
var sendRecvType = MediaDirection.RECEIVE;
|
|
18697
|
+
if (type.includes('audio-recv')) {
|
|
18698
|
+
this.statsResults[type][sendRecvType].clockRate = result.clockRate;
|
|
18699
|
+
}
|
|
18700
|
+
}
|
|
18639
18701
|
compareLastStatsResult() {
|
|
18640
18702
|
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
18641
18703
|
var getCurrentStatsTotals = (keyPrefix, value) => Object.keys(this.statsResults).filter(key => key.startsWith(keyPrefix)).reduce((prev, cur) => {
|
|
@@ -18869,6 +18931,7 @@ class StatsAnalyzer extends EventEmitter$5 {
|
|
|
18869
18931
|
this.statsResults[mediaType][sendrecvType].totalSamplesReceived = result.totalSamplesReceived || 0;
|
|
18870
18932
|
this.statsResults[mediaType][sendrecvType].totalSamplesDecoded = result.totalSamplesDecoded || 0;
|
|
18871
18933
|
this.statsResults[mediaType][sendrecvType].concealedSamples = result.concealedSamples || 0;
|
|
18934
|
+
this.statsResults[mediaType][sendrecvType].silentConcealedSamples = result.silentConcealedSamples || 0;
|
|
18872
18935
|
this.statsResults[mediaType][sendrecvType].isRequested = result.isRequested;
|
|
18873
18936
|
this.statsResults[mediaType][sendrecvType].lastRequestedUpdateTimestamp = result.lastRequestedUpdateTimestamp;
|
|
18874
18937
|
}
|
|
@@ -19019,4 +19082,4 @@ var Media = {
|
|
|
19019
19082
|
}
|
|
19020
19083
|
};
|
|
19021
19084
|
|
|
19022
|
-
export { ActiveSpeakerInfo, CodecInfo$1 as CodecInfo, ConnectionState, ErrorType, Errors, H264Codec, LocalCameraStream, LocalDisplayStream, LocalMicrophoneStream, LocalStream, LocalStreamEventNames, LocalSystemAudioStream, Media, MediaConnectionEventNames, MediaContent, MediaFamily, MediaStreamTrackKind, MediaType, MultistreamRoapMediaConnection, NetworkQualityEventNames, NetworkQualityMonitor, PeerConnection, Policy, ReceiveSlot, ReceiveSlotEvents, ReceiverSelectedInfo, RecommendedOpusBitrates, RemoteStream, RemoteStreamEventNames, RemoteTrackType, RoapMediaConnection, SendSlot, StatsAnalyzer, StatsAnalyzerEventNames, StreamEventNames, StreamRequest, WcmeError, WcmeErrorType, configureWcmeLogger, createCameraStream, createDisplayStream, createDisplayStreamWithAudio, createMicrophoneStream, getAudioInputDevices, getAudioOutputDevices, getDevices, getErrorDescription, getLogger, getMediaFamily, getRecommendedMaxBitrateForFrameSize, getVideoInputDevices, setLogger, setOnDeviceChangeHandler };
|
|
19085
|
+
export { ActiveSpeakerInfo, CodecInfo$1 as CodecInfo, ConnectionState, ErrorType, Errors, H264Codec, LocalCameraStream, LocalDisplayStream, LocalMicrophoneStream, LocalStream, LocalStreamEventNames, LocalSystemAudioStream, Media, MediaConnectionEventNames, MediaContent, MediaFamily, MediaStreamTrackKind, MediaType, MultistreamRoapMediaConnection, NetworkQualityEventNames, NetworkQualityMonitor, PeerConnection, Policy, ReceiveSlot, ReceiveSlotEvents, ReceiverSelectedInfo, RecommendedOpusBitrates, RemoteStream, RemoteStreamEventNames, RemoteTrackType, RoapMediaConnection, SendSlot, StatsAnalyzer, StatsAnalyzerEventNames, StreamEventNames, StreamRequest, WcmeError, WcmeErrorType, configureWcmeLogger, createCameraAndMicrophoneStreams, createCameraStream, createDisplayMedia, createDisplayStream, createDisplayStreamWithAudio, createMicrophoneStream, getAudioInputDevices, getAudioOutputDevices, getDevices, getErrorDescription, getLogger, getMediaFamily, getRecommendedMaxBitrateForFrameSize, getVideoInputDevices, setLogger, setOnDeviceChangeHandler };
|
|
@@ -3,7 +3,7 @@ import { EventEmitter } from '../EventEmitter';
|
|
|
3
3
|
import { ConnectionState, RoapMessage, MultistreamConnectionEvents, RoapEvents } from './eventTypes';
|
|
4
4
|
import { MultistreamConnectionConfig } from './config';
|
|
5
5
|
import { CloseCallback, SendMetricsCallback } from './types';
|
|
6
|
-
export { ReceiveSlot, ReceiveSlotEvents, SendSlot, StreamRequest, MetricsCallback, getAudioOutputDevices, getVideoInputDevices, setOnDeviceChangeHandler, WcmeError, WcmeErrorType, AudioDeviceConstraints, VideoDeviceConstraints, StreamEventNames, LocalStreamEventNames, LocalCameraStream, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream, LocalStream, MediaStreamTrackKind, PeerConnection, RemoteStream, RemoteStreamEventNames, VideoContentHint, createCameraStream, createDisplayStream, createDisplayStreamWithAudio, createMicrophoneStream, getDevices, getAudioInputDevices, ActiveSpeakerInfo, CodecInfo, getMediaFamily, H264Codec, MediaFamily, MediaType, NamedMediaGroup, StreamState, Policy, PolicySpecificInfo, ReceiverSelectedInfo, getRecommendedMaxBitrateForFrameSize, RecommendedOpusBitrates, } from '@webex/web-client-media-engine';
|
|
6
|
+
export { ReceiveSlot, ReceiveSlotEvents, SendSlot, StreamRequest, MetricsCallback, getAudioOutputDevices, getVideoInputDevices, setOnDeviceChangeHandler, WcmeError, WcmeErrorType, AudioDeviceConstraints, VideoDeviceConstraints, StreamEventNames, LocalStreamEventNames, LocalCameraStream, LocalDisplayStream, LocalSystemAudioStream, LocalMicrophoneStream, LocalStream, MediaStreamTrackKind, PeerConnection, RemoteStream, RemoteStreamEventNames, VideoContentHint, createCameraAndMicrophoneStreams, createCameraStream, createDisplayMedia, createDisplayStream, createDisplayStreamWithAudio, createMicrophoneStream, getDevices, getAudioInputDevices, ActiveSpeakerInfo, CodecInfo, getMediaFamily, H264Codec, MediaFamily, MediaType, NamedMediaGroup, StreamState, Policy, PolicySpecificInfo, ReceiverSelectedInfo, getRecommendedMaxBitrateForFrameSize, RecommendedOpusBitrates, } from '@webex/web-client-media-engine';
|
|
7
7
|
export declare class MultistreamRoapMediaConnection extends EventEmitter<MultistreamConnectionEvents | RoapEvents> {
|
|
8
8
|
private id?;
|
|
9
9
|
private debugId?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultistreamRoapMediaConnection.d.ts","sourceRoot":"","sources":["../../../src/MediaConnection/MultistreamRoapMediaConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,aAAa,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|
|
@@ -36,6 +36,7 @@ export declare class StatsAnalyzer extends EventEmitter<StatsAnalyzerEvents> {
|
|
|
36
36
|
private parseGetStatsResult;
|
|
37
37
|
private filterAndParseGetStatsResults;
|
|
38
38
|
private parseAudioSource;
|
|
39
|
+
private parseCodec;
|
|
39
40
|
private emitStartStopEvents;
|
|
40
41
|
private compareLastStatsResult;
|
|
41
42
|
private getStatsAndParse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatsAnalyzer.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/StatsAnalyzer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA8B/C,OAAO,EAIL,yBAAyB,EACzB,OAAO,EAEP,mBAAmB,EACnB,YAAY,EAEb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzF,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EAGpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAKhE,qBAAa,aAAc,SAAQ,YAAY,CAAC,mBAAmB,CAAC;IAClE,MAAM,EAAE,mBAAmB,CAAC;IAE5B,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAElC,0BAA0B,EAAE,0BAA0B,CAAC;IAEvD,eAAe,EAAE,OAAO,CAAC;IAEzB,gBAAgB,EAAE,YAAY,GAAG,IAAI,CAAC;IAEtC,kBAAkB,CAAC,EAAE,yBAAyB,CAAC;IAE/C,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;IAE5C,YAAY,EAAE,MAAM,CAAC;IAErB,qBAAqB,EAAE,qBAAqB,CAAC;IAE7C,eAAe,EAAE,8BAA8B,GAAG,mBAAmB,GAAG,IAAI,CAAC;IAE7E,aAAa,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CA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AAmB,CAkDzB;IAKF,OAAO,CAAC,sBAAsB;IAgN9B,OAAO,CAAC,gBAAgB;IAyExB,OAAO,CAAC,wBAAwB;IA2DhC,OAAO,CAAC,uBAAuB;IAoK/B,OAAO,CAAC,6CAA6C,CA+BnD;IAUF,OAAO,CAAC,cAAc,CAuDpB;IAQF,OAAO,CAAC,sBAAsB;CAkD/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,MAAM,SAAS,CAAC;AAGpD,eAAO,MAAM,aAAa,EAAE,YAgC3B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,YAAY,EAAE,MAAM,SAAS,CAAC;AAGpD,eAAO,MAAM,aAAa,EAAE,YAgC3B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;CAgBpC,CAAC;AAEF,eAAO,MAAM,YAAY,QAAQ,CAAC;AAGlC,eAAO,MAAM,SAAS,YAAY,CAAC;AAEnC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B5B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC7B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;CAmBnC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC9B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;CAWpC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC7B,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BnC,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC9B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmCpC,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;CAOvB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC;AAIF,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,eAAO,MAAM,oBAAoB;;;CAGhC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;CAKnC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/utils.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/StatsAnalyzer/utils.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsFhE,eAAO,MAAM,mBAAmB;mBAQf,OAAO,MAAM,EAAE,GAAG,CAAC;kBACpB,YAAY;qBACT,OAAO;mBACT,MAAM;mBACN,OAAO;UAuDvB,CAAC;AAEF,eAAO,MAAM,yBAAyB;yBAOf,OAAO,MAAM,EAAE,GAAG,CAAC;kBAC1B,YAAY;qBACT,OAAO;eACb,MAAM;UA2DlB,CAAC;AAEF,eAAO,MAAM,iBAAiB;iBAQf,OAAO,MAAM,EAAE,GAAG,CAAC;kBAClB,YAAY;qBACT,OAAO;mBACT,MAAM;mBACN,OAAO;UA4DvB,CAAC;AAEF,eAAO,MAAM,uBAAuB;uBAOf,OAAO,MAAM,EAAE,GAAG,CAAC;kBACxB,YAAY;qBACT,OAAO;eACb,MAAM;UAwClB,CAAC;AAEF,eAAO,MAAM,mBAAmB;mBAQf,OAAO,MAAM,EAAE,GAAG,CAAC;kBACpB,YAAY;qBACT,OAAO;mBACT,MAAM;mBACN,OAAO;UA0DvB,CAAC;AAEF,eAAO,MAAM,yBAAyB;yBAOf,OAAO,MAAM,EAAE,GAAG,CAAC;kBAC1B,YAAY;qBACT,OAAO;eACb,MAAM;UA8ElB,CAAC;AAEF,eAAO,MAAM,iBAAiB;iBAQf,OAAO,MAAM,EAAE,GAAG,CAAC;kBAClB,YAAY;qBACT,OAAO;mBACT,MAAM;mBACN,OAAO;UAmEvB,CAAC;AAEF,eAAO,MAAM,uBAAuB;uBAOf,OAAO,MAAM,EAAE,GAAG,CAAC;kBACxB,YAAY;qBACT,OAAO;eACb,MAAM;UAwDlB,CAAC;AAWF,eAAO,MAAM,iBAAiB;mBAMb,OAAO;kBACR,YAAY;eACf,MAAM;eACN,cAAc;MACvB,OAUH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-media-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist/cjs",
|
|
6
6
|
"dist/esm",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@webex/rtcstats": "^1.5.0",
|
|
61
61
|
"@webex/ts-sdp": "1.7.0",
|
|
62
62
|
"@webex/web-capabilities": "^1.4.1",
|
|
63
|
-
"@webex/web-client-media-engine": "3.
|
|
63
|
+
"@webex/web-client-media-engine": "3.28.0",
|
|
64
64
|
"events": "^3.3.0",
|
|
65
65
|
"typed-emitter": "^2.1.0",
|
|
66
66
|
"uuid": "^8.3.2",
|