* [MM-60291] Fix rendering of live captions (#8185)
* Load jobs state from call state
* Fix rendering of live captions overlay
(cherry picked from commit 13ca346155)
* Fix type error
---------
Co-authored-by: Claudio Costa <cstcld91@gmail.com>
This commit is contained in:
parent
6a402e3bcc
commit
dfffcc0015
4 changed files with 16 additions and 3 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -250,5 +250,13 @@ export const handleCallState = (serverUrl: string, msg: WebSocketMessage<CallSta
|
|||
const call = createCallAndAddToIds(msg.data.channel_id, callState);
|
||||
|
||||
setCallForChannel(serverUrl, msg.data.channel_id, call);
|
||||
|
||||
if (callState.recording) {
|
||||
setRecordingState(serverUrl, msg.data.channel_id, callState.recording);
|
||||
}
|
||||
|
||||
if (callState.live_captions) {
|
||||
setCaptioningState(serverUrl, msg.data.channel_id, callState.live_captions);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ export const DefaultCallsConfig: CallsConfigState = {
|
|||
EnableTranscriptions: false,
|
||||
EnableLiveCaptions: false,
|
||||
HostControlsAllowed: false,
|
||||
GroupCallsAllowed: true, // Set to true to keep backward compatibility with older servers.
|
||||
};
|
||||
|
||||
export type ApiResp = {
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -6,7 +6,7 @@
|
|||
"packages": {
|
||||
"": {
|
||||
"name": "mattermost-mobile",
|
||||
"version": "2.18.0",
|
||||
"version": "2.19.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache 2.0",
|
||||
"dependencies": {
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
"emoji-regex": "10.3.0",
|
||||
"expo": "51.0.14",
|
||||
"expo-application": "5.9.1",
|
||||
"expo-crypto": "~13.0.2",
|
||||
"expo-crypto": "13.0.2",
|
||||
"expo-device": "6.0.2",
|
||||
"expo-image": "1.12.12",
|
||||
"expo-linear-gradient": "13.0.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue