Skip to content

Commit

Permalink
feat(recording) show recording icon when transcribing
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Jan 29, 2024
1 parent 6e6433e commit 7e8c1fd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default class AbstractRecordingLabel extends Component<IProps, IState> {
* @inheritdoc
*/
render() {
return this.props._status && !this.state.staleLabel && !this.props._iAmRecorder
return (this.props._status || this.props._isTranscribing) && !this.state.staleLabel && !this.props._iAmRecorder
? this._renderLabel() : null;
}

Expand Down
25 changes: 14 additions & 11 deletions react/features/recording/components/web/RecordingLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,23 @@ class RecordingLabel extends AbstractRecordingLabel {
* @inheritdoc
*/
_renderLabel() {
if (this.props._status !== JitsiRecordingConstants.status.ON) {
// Since there are no expanded labels on web, we only render this
// label when the recording status is ON.
return null;
}

const { classes, mode, t } = this.props;
const { _isTranscribing, _status, classes, mode, t } = this.props;
const isRecording = mode === JitsiRecordingConstants.mode.FILE;
const icon = isRecording ? IconRecord : IconSites;
const icon = isRecording || _isTranscribing ? IconRecord : IconSites;
let content;

let content = t(isRecording ? 'videoStatus.recording' : 'videoStatus.streaming');
if (_status === JitsiRecordingConstants.status.ON) {
content = t(isRecording || _isTranscribing ? 'videoStatus.recording' : 'videoStatus.streaming');

if (this.props._isTranscribing) {
content += ` \u00B7 ${t('transcribing.labelToolTip')}`;
if (_isTranscribing) {
content += ` \u00B7 ${t('transcribing.labelToolTip')}`;
}
} else if (mode === JitsiRecordingConstants.mode.STREAM) {
return null;
} else if (_isTranscribing) {
content = t('transcribing.labelToolTip');
} else {
return null;
}

return (
Expand Down

0 comments on commit 7e8c1fd

Please sign in to comment.