feat(rtcstats): send facial expressions to rtcstats-server (#10461)
* send facial expressions to rtcstats * remove comment * remove extra line
This commit is contained in:
parent
73fb586d59
commit
0fc381fc6f
|
@ -95,6 +95,16 @@ class RTCStats {
|
|||
this.trace && this.trace.statsEntry('dominantSpeaker', null, dominantSpeakerData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send facial expression data, the data will be processed by rtcstats-server and saved in the dump file.
|
||||
*
|
||||
* @param {Object} facialExpressionData - Facial expression data to be saved in the rtcstats dump.
|
||||
* @returns {void}
|
||||
*/
|
||||
sendFacialExpressionData(facialExpressionData) {
|
||||
this.trace && this.trace.statsEntry('facialExpression', null, facialExpressionData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to the rtcstats server instance. Stats (data obtained from getstats) won't be send until the
|
||||
* connect successfully initializes, however calls to GUM are recorded in an internal buffer even if not
|
||||
|
|
|
@ -7,6 +7,7 @@ import { CONFERENCE_UNIQUE_ID_SET, getConferenceOptions, getRoomName } from '../
|
|||
import { LIB_WILL_INIT } from '../base/lib-jitsi-meet';
|
||||
import { DOMINANT_SPEAKER_CHANGED, getLocalParticipant } from '../base/participants';
|
||||
import { MiddlewareRegistry } from '../base/redux';
|
||||
import { ADD_FACIAL_EXPRESSION } from '../facial-recognition/actionTypes';
|
||||
|
||||
import RTCStats from './RTCStats';
|
||||
import { canSendRtcstatsData, isRtcstatsEnabled } from './functions';
|
||||
|
@ -104,6 +105,17 @@ MiddlewareRegistry.register(store => next => action => {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case ADD_FACIAL_EXPRESSION: {
|
||||
if (canSendRtcstatsData(state)) {
|
||||
const { duration, facialExpression } = action;
|
||||
|
||||
RTCStats.sendFacialExpressionData({
|
||||
duration,
|
||||
facialExpression
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return next(action);
|
||||
|
|
Loading…
Reference in New Issue