From dfffcc001559822e30c6c09bcee68075b6e9ce3a Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Wed, 28 Aug 2024 16:06:52 +0200 Subject: [PATCH] Automated cherry pick of #8185 (#8186) * [MM-60291] Fix rendering of live captions (#8185) * Load jobs state from call state * Fix rendering of live captions overlay (cherry picked from commit 13ca3461556c2677edef7182c8e393b060a8489d) * Fix type error --------- Co-authored-by: Claudio Costa --- app/products/calls/components/captions.tsx | 6 +++++- app/products/calls/connection/websocket_event_handlers.ts | 8 ++++++++ app/products/calls/types/calls.ts | 1 + package-lock.json | 4 ++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/app/products/calls/components/captions.tsx b/app/products/calls/components/captions.tsx index 47bffee41..dff6410d0 100644 --- a/app/products/calls/components/captions.tsx +++ b/app/products/calls/components/captions.tsx @@ -21,11 +21,15 @@ const styles = StyleSheet.create({ captionContainer: { display: 'flex', height: 400, - bottom: -352, // 48-400, to place the bottoms at the same place + bottom: 400 - 48, // to place the bottoms at the same place gap: 8, alignItems: 'center', flexDirection: 'column-reverse', overflow: 'hidden', + + // needed so that events (e.g., long press on participants) + // still work when the captions overlay is rendered on top + pointerEvents: 'none', }, caption: { paddingTop: 1, diff --git a/app/products/calls/connection/websocket_event_handlers.ts b/app/products/calls/connection/websocket_event_handlers.ts index 9a0693dda..5c1c9aac0 100644 --- a/app/products/calls/connection/websocket_event_handlers.ts +++ b/app/products/calls/connection/websocket_event_handlers.ts @@ -250,5 +250,13 @@ export const handleCallState = (serverUrl: string, msg: WebSocketMessage