mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
fix(transcribing) fix overriding transcribing state
Skip updating the transcribing state when the 'audio-recording-enabled' property is not provided. This fixes a race when a transcriber is already in the room, we'll see it before properties are updated (sometimes) and without checking for undefined we'd flip the local value to false.
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
6141ff78f8
commit
d2ed9ffef6
@@ -46,13 +46,17 @@ ReducerRegistry.register<ITranscribingState>('features/transcribing',
|
||||
(state = _getInitialState(), action): ITranscribingState => {
|
||||
switch (action.type) {
|
||||
case CONFERENCE_PROPERTIES_CHANGED: {
|
||||
const audioRecordingEnabled = action.properties?.['audio-recording-enabled'] === 'true';
|
||||
const audioRecording = action.properties?.['audio-recording-enabled'];
|
||||
|
||||
if (state.isTranscribing !== audioRecordingEnabled) {
|
||||
return {
|
||||
...state,
|
||||
isTranscribing: audioRecordingEnabled
|
||||
};
|
||||
if (typeof audioRecording !== 'undefined') {
|
||||
const audioRecordingEnabled = audioRecording === 'true';
|
||||
|
||||
if (state.isTranscribing !== audioRecordingEnabled) {
|
||||
return {
|
||||
...state,
|
||||
isTranscribing: audioRecordingEnabled
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return state;
|
||||
|
||||
Reference in New Issue
Block a user