Skip to content
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

Merged
merged 11 commits into from
Jul 26, 2018

Conversation

nikvaessen
Copy link
Contributor

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.

@virtuacoplenny virtuacoplenny self-requested a review July 2, 2018 15:47
*/
_onToolbarToggleTranscribing() {
this._doToggleTranscribing();
}
Copy link
Contributor

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
});
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

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(
Copy link
Contributor

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
Copy link
Contributor

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));
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Contributor Author

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

@nikvaessen
Copy link
Contributor Author

How could I test if the analytic event is working?

if (!(isDialing || isTranscribing)) {
store.dispatch(showPendingTranscribingNotification());

conference.room.dial(TRANSCRIBER_DIAL_COMMAND).catch(
Copy link
Contributor

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);
Copy link
Contributor

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.

@virtuacoplenny
Copy link
Contributor

How could I test if the analytic event is working?

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.

@nikvaessen
Copy link
Contributor Author

Event on button press worked on Splunk.

@@ -75,6 +75,8 @@ import {
getAvatarURLByParticipantId,
getLocalParticipant,
getParticipantById,
hiddenParticipantJoined,
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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' />
Copy link
Contributor

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.

virtuacoplenny
virtuacoplenny previously approved these changes Jul 6, 2018
@nikvaessen
Copy link
Contributor Author

Force pushed to the PR... messed up with fixing a merge conflict.

virtuacoplenny
virtuacoplenny previously approved these changes Jul 25, 2018
# Conflicts:
#	fonts/jitsi.eot
#	fonts/jitsi.svg
#	fonts/jitsi.ttf
#	fonts/jitsi.woff
#	fonts/selection.json
#	react/features/base/font-icons/jitsi.json
virtuacoplenny
virtuacoplenny previously approved these changes Jul 26, 2018
css/_font.scss Outdated
@@ -24,6 +24,10 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

.icon-cc:before {
Copy link
Contributor

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?

@virtuacoplenny virtuacoplenny merged commit b8daf0a into jitsi:master Jul 26, 2018
@nikvaessen nikvaessen deleted the pr_ui_transcription branch July 26, 2018 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants