mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
fix: Fix reading transcription results from JVB. (#16725)
* fix: Fix reading transcription results from JVB.
This commit is contained in:
@@ -80,3 +80,8 @@ export const LOWER_HAND_AUDIO_LEVEL = 0.2;
|
|||||||
* Icon URL for the whiteboard participant.
|
* Icon URL for the whiteboard participant.
|
||||||
*/
|
*/
|
||||||
export const WHITEBOARD_PARTICIPANT_ICON = IconWhiteboard;
|
export const WHITEBOARD_PARTICIPANT_ICON = IconWhiteboard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The ID used for non-participant (system) messages coming from a transcriber.
|
||||||
|
*/
|
||||||
|
export const TRANSCRIBER_ID = 'transcriber';
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { ENDPOINT_MESSAGE_RECEIVED, NON_PARTICIPANT_MESSAGE_RECEIVED } from '../
|
|||||||
import { MEET_FEATURES } from '../base/jwt/constants';
|
import { MEET_FEATURES } from '../base/jwt/constants';
|
||||||
import { isJwtFeatureEnabled } from '../base/jwt/functions';
|
import { isJwtFeatureEnabled } from '../base/jwt/functions';
|
||||||
import JitsiMeetJS from '../base/lib-jitsi-meet';
|
import JitsiMeetJS from '../base/lib-jitsi-meet';
|
||||||
|
import { TRANSCRIBER_ID } from '../base/participants/constants';
|
||||||
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
|
import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
|
||||||
import { showErrorNotification } from '../notifications/actions';
|
import { showErrorNotification } from '../notifications/actions';
|
||||||
import { TRANSCRIBER_JOINED } from '../transcribing/actionTypes';
|
import { TRANSCRIBER_JOINED } from '../transcribing/actionTypes';
|
||||||
@@ -118,7 +119,18 @@ MiddlewareRegistry.register(store => next => action => {
|
|||||||
* @returns {Object} The value returned by {@code next(action)}.
|
* @returns {Object} The value returned by {@code next(action)}.
|
||||||
*/
|
*/
|
||||||
function _endpointMessageReceived(store: IStore, next: Function, action: AnyAction) {
|
function _endpointMessageReceived(store: IStore, next: Function, action: AnyAction) {
|
||||||
const { data: json } = action;
|
let json: any = {};
|
||||||
|
|
||||||
|
if (action.type === ENDPOINT_MESSAGE_RECEIVED) {
|
||||||
|
if (!action.participant.isHidden()) {
|
||||||
|
return next(action);
|
||||||
|
}
|
||||||
|
json = action.data;
|
||||||
|
} else if (action.type === NON_PARTICIPANT_MESSAGE_RECEIVED && action.id === TRANSCRIBER_ID) {
|
||||||
|
json = action.json;
|
||||||
|
} else {
|
||||||
|
return next(action);
|
||||||
|
}
|
||||||
|
|
||||||
if (![ JSON_TYPE_TRANSCRIPTION_RESULT, JSON_TYPE_TRANSLATION_RESULT ].includes(json?.type)) {
|
if (![ JSON_TYPE_TRANSCRIPTION_RESULT, JSON_TYPE_TRANSLATION_RESULT ].includes(json?.type)) {
|
||||||
return next(action);
|
return next(action);
|
||||||
|
|||||||
Reference in New Issue
Block a user