ref(stats): start the statsEmitter for both mobile and web
Moves the statsEmitter.start() invocation to the middleware of the connection-indicator feature, so that it's started for both mobile and web (now mobile needs RTP stats for the tests).
This commit is contained in:
parent
3f99e80358
commit
461540d874
|
@ -94,7 +94,6 @@ import {
|
||||||
getLocationContextRoot,
|
getLocationContextRoot,
|
||||||
getJitsiMeetGlobalNS
|
getJitsiMeetGlobalNS
|
||||||
} from './react/features/base/util';
|
} from './react/features/base/util';
|
||||||
import { statsEmitter } from './react/features/connection-indicator';
|
|
||||||
import { showDesktopPicker } from './react/features/desktop-picker';
|
import { showDesktopPicker } from './react/features/desktop-picker';
|
||||||
import { appendSuffix } from './react/features/display-name';
|
import { appendSuffix } from './react/features/display-name';
|
||||||
import {
|
import {
|
||||||
|
@ -2079,8 +2078,6 @@ export default {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
statsEmitter.startListeningForStats(room);
|
|
||||||
|
|
||||||
room.addCommandListener(this.commands.defaults.ETHERPAD,
|
room.addCommandListener(this.commands.defaults.ETHERPAD,
|
||||||
({ value }) => {
|
({ value }) => {
|
||||||
APP.UI.initEtherpad(value);
|
APP.UI.initEtherpad(value);
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export * from './components';
|
export * from './components';
|
||||||
|
|
||||||
export { default as statsEmitter } from './statsEmitter';
|
export { default as statsEmitter } from './statsEmitter';
|
||||||
|
|
||||||
|
import './middleware';
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
// @flow
|
||||||
|
|
||||||
|
import { MiddlewareRegistry } from '../base/redux';
|
||||||
|
import { CONFERENCE_JOINED } from '../base/conference';
|
||||||
|
|
||||||
|
import { statsEmitter } from './index';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements the middleware of the feature connection-indicator.
|
||||||
|
*
|
||||||
|
* @param {Store} store - The redux store.
|
||||||
|
* @returns {Function}
|
||||||
|
*/
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
MiddlewareRegistry.register(store => next => action => {
|
||||||
|
switch (action.type) {
|
||||||
|
case CONFERENCE_JOINED: {
|
||||||
|
statsEmitter.startListeningForStats(action.conference);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return next(action);
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in New Issue