add(face-landmarks): flag for rtc stats (#11682)

* add(face-landmarks): flag for rtc stats

* fix: check is faceLandmarks is defined
This commit is contained in:
Gabriel Borlea 2022-06-16 14:13:36 +03:00 committed by GitHub
parent fbf693b2dc
commit 624f88e069
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -788,6 +788,9 @@ var config = {
// // Enables displaying face expressions in speaker stats
// enableDisplayFaceExpressions: false,
// // Enable rtc stats for face landmarks
// enableRTCStats: false,
// // Minimum required face movement percentage threshold for sending new face centering coordinates data.
// faceCenteringThreshold: 10,

View File

@ -25,7 +25,7 @@ import logger from './logger';
MiddlewareRegistry.register(store => next => action => {
const state = store.getState();
const config = state['features/base/config'];
const { analytics } = config;
const { analytics, faceLandmarks } = config;
switch (action.type) {
case LIB_WILL_INIT: {
@ -151,7 +151,7 @@ MiddlewareRegistry.register(store => next => action => {
break;
}
case ADD_FACE_EXPRESSION: {
if (canSendRtcstatsData(state)) {
if (canSendRtcstatsData(state) && faceLandmarks && faceLandmarks.enableRTCStats) {
const { duration, faceExpression, timestamp } = action;
RTCStats.sendFaceExpressionData({