-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MM-57019] Calls: Live captions support for mobile #7854
Conversation
@enahum Thanks for the comments! One question -- I added new i18n message ids, but |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As for the extract of i18n nothing has change as far as I'm aware
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I18n extract is the one thing pending
@enahum It looks like there's something wrong with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Left a couple of minor comments.
@@ -472,6 +484,7 @@ const CallScreen = ({ | |||
const waitingForRecording = Boolean(currentCall?.recState?.init_at && !currentCall.recState.start_at && !currentCall.recState.end_at && isHost); | |||
const showStartRecording = isHost && EnableRecordings && !(waitingForRecording || recording); | |||
const showStopRecording = isHost && EnableRecordings && (waitingForRecording || recording); | |||
const ccAvailable = Boolean(EnableRecordings && EnableTranscriptions && EnableLiveCaptions && recording); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More of a comment than a request but I feel this is a lot and if we ever decoupled the job it will essentially break. Wondering if we should instead have a single server side boolean to inform whether a live caption is available for the current call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yah, could be another way to go. Of course it wouldn't simplify the logic, it would just move the logic to the backend--but then we wouldn't need to change the client in that future case. Is it on the horizon that we could have captions without transcriptions, and/or transcriptions without recordings?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it on the horizon that we could have captions without transcriptions, and/or transcriptions without recordings?
I am not sure to be honest but logic on the backend is advantageous because it can also be dynamic. For example, this boolean could go in the state call itself and potentially be turned to false in case of issues with live captions (e.g. due to performance) as we discussed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are made in mattermost/mattermost-plugin-calls#633 now, so adding them here.
style={styles.text} | ||
numberOfLines={0} | ||
> | ||
{`(${displayUsername(sessionsDict[cap.sessionId]?.userModel, intl.locale, teammateNameDisplay)}) ${cap.text}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again more of a question for my own understanding. Is there any downside in using the whole sessions dictionary in terms of re-renders? After all what we really need is just the participant's id, not even the session as technically the user id would be sufficient right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean here about 'all what we really need is just the participant's id' -- it's the userModel that we need. If that's what you meant, then I guess we could create a userModels dict in the parent component and only pass that in, but that wouldn't save any renders because it would be a new object also on every parent render, and we would then be creating another new object that would need to be collected later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point here is that the sessions and participants state is data that can mutate quite often whereas the users (participants) models would only change when joining/leaving. So I was wondering whether there could be value in making this component depend on the latter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Normally yes, that would be the right thing to do. But the way that the userModels are stored, we would need to extract it out on any change anyway. That would potentially be a good optimization to do (make an independent useModel dict), so I'll put that on my list. On the other hand, the amount of speedup in this case would be very little I imagine, given how it's only a few lines of captions. But the principle is good for maybe the participants grid or something more heavy.
@cpoile I ran i18n-extract on my machine and it worked just fine.. so I guess there is something in your machine preventing it from running correctly. I took the liberty to push the commit the with changes. |
@enahum Thank you, I appreciate it. I don't know why it's not working for me. |
@mvitale1989 can you check why the CI is not failing when detecting the diff? thanks my friend. |
afaiu it seems to be an issue in the
Given the above, I suppose the intention was for the script to fail if there were any changes, as Christopher expected. But the script has been missing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great stuff @cpoile. Awesome job. From my tests I don't have any changes. The load testing worked like a charm!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks for bearing with me on the feedback.
* mobile support for live captions * add the 'Live captions turned on' ephemeral notice * PR comments * message should be translatable * run i18n-extract * call_recording_state -> call_job_state; ccAvailable is now dynamic * backwards compatibility with pre calls v0.26.0 * correct mobile version in deprecation comments --------- Co-authored-by: Elias Nahum <[email protected]>
Summary
Live captions turned on
ephemeral message when switching captions on -- it lasts 2 seconds, and won't show if there are already captions showing.voip
UIBackgroundMode, as recommended by the react-native-webrtc folks -- I thought we already had it, but I guess we didn't, so adding it here. Let me know if I need to do anything else or add documentation.Ticket Link
Checklist
Device Information
Screenshots
Release Note