-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[WEB] add UI for transcription #3213
Conversation
*/ | ||
_onToolbarToggleTranscribing() { | ||
this._doToggleTranscribing(); | ||
} |
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.
Probably want to add some analytics for this event. While adding analytics in jitsi-meet is pretty inconsistent, I think at least toolbox has analytics for all its buttons.
componentWillReceiveProps(nextProps) { | ||
this.setState({ | ||
hidden: !nextProps._transcribing | ||
}); |
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.
Why use state instead of using the transcribing prop directly?
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.
I don't understand this question. Do you mean this.setState(nextProps)
? If so, doesn't nextProps
contains the function t
?
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.
Instead of checking this.state.hidden or !this.state.hidden, why not check this.props._transcribing directly?
if (!(isDialing || isTranscribing)) { | ||
store.dispatch(showPendingTranscribingNotification()); | ||
|
||
APP.conference._room.dial(TRANSCRIBER_DIAL_COMMAND).then( |
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.
You have access to the conference through the store if you want to use it. I'd avoid using the global as much as possible because the intent is to get rid of it some day, whenever that day may be.
|
||
APP.conference._room.dial(TRANSCRIBER_DIAL_COMMAND).then( | ||
() => { | ||
// do nothing |
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.
Maybe using a .catch instead of .then is more expressive of what you want to do.
&& action.displayName === TRANSCRIBER_DISPLAY_NAME) { | ||
store.dispatch(transcriberJoined(action.id)); | ||
} else { | ||
store.dispatch(potentialTranscriberJoined(action.id)); |
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.
What conditions cause potentialTranscriberJoined
to be needed?
...state, | ||
potentialTranscriberJIDs: | ||
[ action.transcriberJID ] | ||
.concat(state.potentialTranscriberJIDs) |
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.
What's the scenario in which there can be more than 1 potential subscriber jid? Is it possible for multiple people to start transcribing?
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.
Because Jibri and Jigasi will both use the recorder domain (hidden domain), both Jibri and Jigasi joining the conference will result in a HIDDEN_PARTICIPANT_JOINED event. We check for Jigasi instance by looking for the DisplayName, which should be Transcriber, but the presence causing the event to be emitted does not yet contain the displayname. Thus I store the potential JID's and only start transcribing when the JID is matched to the correct DisplayName
How could I test if the analytic event is working? |
if (!(isDialing || isTranscribing)) { | ||
store.dispatch(showPendingTranscribingNotification()); | ||
|
||
conference.room.dial(TRANSCRIBER_DIAL_COMMAND).catch( |
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.
.catch takes in one function, which is the error handler. It's sugar over .then(undefined, errorCallback)
.
break; | ||
case STOP_TRANSCRIBING: | ||
if (isTranscribing) { | ||
APP.conference._room.kickParticipant(transcriberJID); |
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.
You might also want to swap this reference to the global conference for the locally scoped conference.
When I remember to test it I use the dev proxy server pointed to beta and check if AnalyticsAdapter#sendEvent sends the information I expect. @bgrozev or @hristoterezov very likely know where the events are going and how to access them. |
afb19e8
to
7953afb
Compare
Event on button press worked on Splunk. |
@@ -75,6 +75,8 @@ import { | |||
getAvatarURLByParticipantId, | |||
getLocalParticipant, | |||
getParticipantById, | |||
hiddenParticipantJoined, |
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.
Drive-by observation: we should not need these. A participant can have a hidden property if that's needed. Or alternatively we could filter transcribers before dispatching the participantJoined action.
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.
I disagree; currently a PARTICIPANT_JOINED event triggers whatever logic is required for a new participant, such as displaying it in the filmstrip. All this code should then first check if it's not actually a hidden participant?
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.
And we can't filter for transcriber because the displayname will not be set until a presence which comes later...
position = { 'left' }> | ||
<CircularLabel | ||
className = 'recording-label' | ||
label = 'TR' /> |
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.
It'll be worthwhile to put the label and tooltip content through translation. Check out how other components use t()
and strings in main.json.
9cbc356
to
1061965
Compare
Force pushed to the PR... messed up with fixing a merge conflict. |
7cf24f0
to
72c5618
Compare
# Conflicts: # fonts/jitsi.eot # fonts/jitsi.svg # fonts/jitsi.ttf # fonts/jitsi.woff # fonts/selection.json # react/features/base/font-icons/jitsi.json
70ccd3d
to
9564749
Compare
css/_font.scss
Outdated
@@ -24,6 +24,10 @@ | |||
-webkit-font-smoothing: antialiased; | |||
-moz-osx-font-smoothing: grayscale; | |||
} | |||
|
|||
.icon-cc:before { |
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.
Does this icon really exist? If so where is it used?
This adds a button to invite and kick the transcriber, as well as a label indicating a transcriber is currently in the room.
It does not currently play a sound when the transcriber joins or leaves, and it nothing is currently displayed on mobile.