"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bigbluebutton-html5/imports/ui/components/captions/pad/component.jsx" between
bigbluebutton-2.3.6.tar.gz and bigbluebutton-2.3.7.tar.gz

About: BigBlueButton is a complete web conferencing system (mainly designed for online learning).

component.jsx  (bigbluebutton-2.3.6):component.jsx  (bigbluebutton-2.3.7)
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import { Session } from 'meteor/session'; import { Session } from 'meteor/session';
import { defineMessages, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrap per/component'; import injectWbResizeEvent from '/imports/ui/components/presentation/resize-wrap per/component';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import logger from '/imports/startup/client/logger'; import logger from '/imports/startup/client/logger';
import PadService from './service'; import PadService from './service';
import CaptionsService from '/imports/ui/components/captions/service'; import CaptionsService from '/imports/ui/components/captions/service';
import { notify } from '/imports/ui/services/notification';
import { styles } from './styles'; import { styles } from './styles';
const intlMessages = defineMessages({ const intlMessages = defineMessages({
hide: { hide: {
id: 'app.captions.pad.hide', id: 'app.captions.pad.hide',
description: 'Label for hiding closed captions pad', description: 'Label for hiding closed captions pad',
}, },
tip: { tip: {
id: 'app.captions.pad.tip', id: 'app.captions.pad.tip',
description: 'Label for tip on how to escape closed captions iframe', description: 'Label for tip on how to escape closed captions iframe',
skipping to change at line 49 skipping to change at line 50
description: 'Label for stoping speech recognition', description: 'Label for stoping speech recognition',
}, },
dictationOnDesc: { dictationOnDesc: {
id: 'app.captions.pad.dictationOnDesc', id: 'app.captions.pad.dictationOnDesc',
description: 'Aria description for button that turns on speech recognition', description: 'Aria description for button that turns on speech recognition',
}, },
dictationOffDesc: { dictationOffDesc: {
id: 'app.captions.pad.dictationOffDesc', id: 'app.captions.pad.dictationOffDesc',
description: 'Aria description for button that turns off speech recognition' , description: 'Aria description for button that turns off speech recognition' ,
}, },
speechRecognitionStop: {
id: 'app.captions.pad.speechRecognitionStop',
description: 'Notification for stopped speech recognition',
},
}); });
const propTypes = { const propTypes = {
locale: PropTypes.string.isRequired, locale: PropTypes.string.isRequired,
ownerId: PropTypes.string.isRequired, ownerId: PropTypes.string.isRequired,
currentUserId: PropTypes.string.isRequired, currentUserId: PropTypes.string.isRequired,
padId: PropTypes.string.isRequired, padId: PropTypes.string.isRequired,
readOnlyPadId: PropTypes.string.isRequired, readOnlyPadId: PropTypes.string.isRequired,
name: PropTypes.string.isRequired, name: PropTypes.string.isRequired,
amIModerator: PropTypes.bool.isRequired, amIModerator: PropTypes.bool.isRequired,
skipping to change at line 79 skipping to change at line 84
return null; return null;
} }
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
listening: false, listening: false,
}; };
const { locale } = props; const { locale, intl } = props;
this.recognition = CaptionsService.initSpeechRecognition(locale); this.recognition = CaptionsService.initSpeechRecognition(locale);
this.toggleListen = this.toggleListen.bind(this); this.toggleListen = this.toggleListen.bind(this);
this.handleListen = this.handleListen.bind(this); this.handleListen = this.handleListen.bind(this);
this.recognition.addEventListener('end', () => {
const { listening } = this.state;
if (listening) {
notify(intl.formatMessage(intlMessages.speechRecognitionStop), 'info', '
warning');
this.stopListen();
}
});
} }
componentDidUpdate() { componentDidUpdate() {
const { const {
locale, locale,
ownerId, ownerId,
currentUserId, currentUserId,
} = this.props; } = this.props;
if (this.recognition) { if (this.recognition) {
skipping to change at line 172 skipping to change at line 185
toggleListen() { toggleListen() {
const { const {
listening, listening,
} = this.state; } = this.state;
this.setState({ this.setState({
listening: !listening, listening: !listening,
}, this.handleListen); }, this.handleListen);
} }
stopListen() {
this.setState({ listening: false });
}
render() { render() {
const { const {
locale, locale,
intl, intl,
padId, padId,
readOnlyPadId, readOnlyPadId,
ownerId, ownerId,
name, name,
amIModerator, amIModerator,
} = this.props; } = this.props;
 End of changes. 5 change blocks. 
1 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)