index.js of local recording local-recording(ui): recording button local-recording(encoding): flac support with libflac.js Fixes in RecordingController; integration with UI local-recording(controller): coordinate recording on different clients local-recording(controller): allow recording on remote participants local-recording(controller): global singleton local-recording(controller): use middleware to init LocalRecording cleanup and documentation in RecordingController local-recording(refactor): "Delegate" -> "Adapter" code style stop eslint and flow from complaining temp save: client status fix linter issues fix some docs; remove global LocalRecording instance use node.js packaging for libflac.js; remove vendor/ folder code style: flacEncodeWorker.js use moment.js to do time diff remove the use of console.log code style: flac related files remove excessive empty lines; and more docs remove the use of clockTick for UI updates initalize flacEncodeWorker properly, to avoid premature audio data transmission move the realization of recordingController events from LocalRecordingButton to middleware i18n strings minor markup changes in LocalRecordingInfoDialog fix documentation
53 lines
1.7 KiB
JavaScript
53 lines
1.7 KiB
JavaScript
/* @flow */
|
|
|
|
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app';
|
|
import { CONFERENCE_JOINED } from '../base/conference';
|
|
import { i18next } from '../base/i18n';
|
|
import { MiddlewareRegistry } from '../base/redux';
|
|
import { showNotification } from '../notifications';
|
|
|
|
import { recordingController } from './controller';
|
|
import { signalLocalRecordingEngagement } from './actions';
|
|
|
|
MiddlewareRegistry.register(({ getState, dispatch }) => next => action => {
|
|
const result = next(action);
|
|
|
|
switch (action.type) {
|
|
case CONFERENCE_JOINED: {
|
|
// the Conference object is ready
|
|
const { conference } = getState()['features/base/conference'];
|
|
|
|
recordingController.registerEvents(conference);
|
|
break;
|
|
}
|
|
case APP_WILL_MOUNT:
|
|
// realize the delegates on recordingController,
|
|
// providing UI reactions.
|
|
recordingController.onStateChanged = function(state) {
|
|
dispatch(signalLocalRecordingEngagement(state));
|
|
};
|
|
|
|
recordingController.onWarning = function(message) {
|
|
dispatch(showNotification({
|
|
title: i18next.t('localRecording.localRecording'),
|
|
description: message
|
|
}, 10000));
|
|
};
|
|
|
|
recordingController.onNotify = function(message) {
|
|
dispatch(showNotification({
|
|
title: i18next.t('localRecording.localRecording'),
|
|
description: message
|
|
}, 10000));
|
|
};
|
|
break;
|
|
case APP_WILL_UNMOUNT:
|
|
recordingController.onStateChanged = null;
|
|
recordingController.onNotify = null;
|
|
recordingController.onWarning = null;
|
|
break;
|
|
}
|
|
|
|
return result;
|
|
});
|