mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 11:07:47 +00:00
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
112 lines
2.8 KiB
JavaScript
112 lines
2.8 KiB
JavaScript
/* @flow */
|
|
|
|
import InlineDialog from '@atlaskit/inline-dialog';
|
|
import React, { Component } from 'react';
|
|
|
|
import { translate } from '../../base/i18n';
|
|
import { ToolbarButton } from '../../toolbox';
|
|
|
|
import LocalRecordingInfoDialog from './LocalRecordingInfoDialog';
|
|
|
|
/**
|
|
* The type of the React {@code Component} state of
|
|
* {@link LocalRecordingButton}.
|
|
*/
|
|
type Props = {
|
|
|
|
/**
|
|
* Whether or not {@link LocalRecordingInfoDialog} should be displayed.
|
|
*/
|
|
isDialogShown: boolean,
|
|
|
|
/**
|
|
* Callback function called when {@link LocalRecordingButton} is clicked.
|
|
*/
|
|
onClick: Function,
|
|
|
|
/**
|
|
* Invoked to obtain translated strings.
|
|
*/
|
|
t: Function
|
|
}
|
|
|
|
/**
|
|
* A React {@code Component} for opening or closing the
|
|
* {@code LocalRecordingInfoDialog}.
|
|
*
|
|
* @extends Component
|
|
*/
|
|
class LocalRecordingButton extends Component<Props> {
|
|
|
|
/**
|
|
* Initializes a new {@code LocalRecordingButton} instance.
|
|
*
|
|
* @param {Object} props - The read-only properties with which the new
|
|
* instance is to be initialized.
|
|
*/
|
|
constructor(props: Props) {
|
|
super(props);
|
|
|
|
// Bind event handlers so they are only bound once per instance.
|
|
this._onClick = this._onClick.bind(this);
|
|
}
|
|
|
|
/**
|
|
* Implements React's {@link Component#render()}.
|
|
*
|
|
* @inheritdoc
|
|
* @returns {ReactElement}
|
|
*/
|
|
render() {
|
|
const { isDialogShown, t } = this.props;
|
|
const iconClasses
|
|
= `icon-thumb-menu ${isDialogShown
|
|
? 'icon-rec toggled' : 'icon-rec'}`;
|
|
|
|
return (
|
|
<div className = 'toolbox-button-wth-dialog'>
|
|
<InlineDialog
|
|
content = {
|
|
<LocalRecordingInfoDialog />
|
|
}
|
|
isOpen = { isDialogShown }
|
|
onClose = { this._onCloseDialog }
|
|
position = { 'top right' }>
|
|
<ToolbarButton
|
|
iconName = { iconClasses }
|
|
onClick = { this._onClick }
|
|
tooltip = { t('localRecording.dialogTitle') } />
|
|
</InlineDialog>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
_onClick: () => void;
|
|
|
|
/**
|
|
* Callback invoked when the Toolbar button is clicked.
|
|
*
|
|
* @private
|
|
* @returns {void}
|
|
*/
|
|
_onClick() {
|
|
this.props.onClick();
|
|
}
|
|
|
|
_onCloseDialog: () => void;
|
|
|
|
/**
|
|
* Callback invoked when {@code InlineDialog} signals that it should be
|
|
* close.
|
|
*
|
|
* @returns {void}
|
|
*/
|
|
_onCloseDialog() {
|
|
// Do nothing for now, because we want the dialog to stay open
|
|
// after certain time, otherwise the moderator might need to repeatly
|
|
// open the dialog to see the stats.
|
|
}
|
|
}
|
|
|
|
export default translate(LocalRecordingButton);
|