add getUserMedia failure message
This commit is contained in:
parent
3f367a782a
commit
868c615d6a
@ -113,6 +113,11 @@ function joinVoiceCallSIP(options) {
|
||||
status: 'Failed' });
|
||||
window.dispatchEvent(audioFailed);
|
||||
break;
|
||||
case 'mediafail':
|
||||
let mediaFailed = new CustomEvent('bbb.webrtc.mediaFailed', {
|
||||
status: 'MediaFailed' });
|
||||
window.dispatchEvent(mediaFailed);
|
||||
break;
|
||||
}
|
||||
}, options.isListenOnly, st);
|
||||
return;
|
||||
|
@ -82,6 +82,7 @@
|
||||
"app.actionsBar.emojiMenu.thumbsdownLabel": "Thumbs down",
|
||||
"app.actionsBar.emojiMenu.thumbsdownDesc": "Change your status to thumbs down",
|
||||
"app.audioNotification.audioFailedMessage": "Your audio connection failed to connect. Try again.",
|
||||
"app.audioNotification.mediaFailedMessage": "getUserMicMedia failed, Only secure origins are allowed",
|
||||
"app.breakoutJoinConfirmation.title": "Join Breakout Room",
|
||||
"app.breakoutJoinConfirmation.message": "Do you want to join",
|
||||
"app.breakoutJoinConfirmation.confirmLabel": "Join",
|
||||
|
@ -11,6 +11,10 @@ const intlMessages = defineMessages({
|
||||
id: 'app.audioNotification.audioFailedMessage',
|
||||
description: 'The audio could not connect, Try again',
|
||||
},
|
||||
mediaFailed: {
|
||||
id: 'app.audioNotification.mediaFailedMessage',
|
||||
description: 'Could not access getUserMicMedia, Try again',
|
||||
},
|
||||
});
|
||||
|
||||
class AudioNotificationContainer extends Component {
|
||||
@ -25,15 +29,18 @@ class AudioNotificationContainer extends Component {
|
||||
}
|
||||
|
||||
this.handleAudioFailure = this.handleAudioFailure.bind(this);
|
||||
this.handleMediaFailure = this.handleMediaFailure.bind(this);
|
||||
this.handleClose = this.handleClose.bind(this);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener("bbb.webrtc.failed", this.handleAudioFailure);
|
||||
window.addEventListener("bbb.webrtc.mediaFailed", this.handleMediaFailure);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener("bbb.webrtc.failed", this.handleAudioFailure);
|
||||
window.removeEventListener("bbb.webrtc.mediaFailed", this.handleMediaFailure);
|
||||
}
|
||||
|
||||
handleClose(){
|
||||
@ -48,6 +55,12 @@ class AudioNotificationContainer extends Component {
|
||||
this.setState({status: 'failed'});
|
||||
}
|
||||
|
||||
handleMediaFailure() {
|
||||
this.color = 'danger';
|
||||
this.message = this.props.mediaFailure;
|
||||
this.setState({status: 'failed'});
|
||||
}
|
||||
|
||||
render() {
|
||||
const handleClose = this.handleClose;
|
||||
|
||||
@ -64,5 +77,6 @@ class AudioNotificationContainer extends Component {
|
||||
export default injectIntl(createContainer(({ intl }) => {
|
||||
let messages = {};
|
||||
messages.audioFailure = intl.formatMessage(intlMessages.audioFailed);
|
||||
messages.mediaFailure = intl.formatMessage(intlMessages.mediaFailed);
|
||||
return messages;
|
||||
}, AudioNotificationContainer));
|
||||
|
Loading…
Reference in New Issue
Block a user