change ask permissions timing, small code fixes

This commit is contained in:
Gabriel Carvalho de Campes 2017-10-31 08:53:06 -02:00
parent 436e7df7d4
commit fde5d56d87
5 changed files with 9 additions and 27 deletions

View File

@ -34,7 +34,6 @@ const defaultProps = {
navbar: <NavBarContainer />,
actionsbar: <ActionsBarContainer />,
media: <MediaContainer />,
children: null,
};
const intlMessages = defineMessages({

View File

@ -1,22 +1,9 @@
import React from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import Service from '/imports/ui/components/audio/service';
import PropTypes from 'prop-types';
import AudioTest from './component';
const propTypes = {
children: PropTypes.node,
};
const defaultProps = {
children: null,
};
const AudioTestContainer = props => (
<AudioTest {...props}>
{props.children}
</AudioTest>
);
const AudioTestContainer = props => <AudioTest {...props} />;
export default createContainer(() => ({
outputDeviceId: Service.outputDeviceId(),
@ -26,6 +13,3 @@ export default createContainer(() => ({
sound.play();
},
}), AudioTestContainer);
AudioTestContainer.propTypes = propTypes;
AudioTestContainer.defaultProps = defaultProps;

View File

@ -51,10 +51,7 @@ const intlMessages = defineMessages({
});
const AudioContainer = props =>
(<Audio {...props}>
{props.children}
</Audio>);
const AudioContainer = props => <Audio {...props} />;
let didMountAutoJoin = false;

View File

@ -36,8 +36,6 @@ class AudioManager {
this.bridge = USE_SIP ? new SIPBridge(userData) : new VertoBridge(userData);
this.userData = userData;
this.messages = messages;
this.setDefaultInputDevice();
this.changeOutputDevice('default');
}
defineProperties(obj) {
@ -67,6 +65,12 @@ class AudioManager {
isEchoTest,
} = options;
if (!this.devicesInitialized) {
this.setDefaultInputDevice();
this.changeOutputDevice('default');
this.devicesInitialized = true;
}
this.isConnecting = true;
this.isMuted = false;
this.error = null;

View File

@ -204,11 +204,10 @@
"app.audioModal.closeLabel": "Close",
"app.audioModal.yes": "Yes",
"app.audioModal.no": "No",
"app.audioModal.echoTestTitle": "Speak a few words, Do you hear yourself? Does everything seems correct?",
"app.audioModal.echoTestTitle": "This is a private echo test. Speak a few words. Did you hear audio?",
"app.audioModal.settingsTitle": "Change your audio settings",
"app.audioModal.connecting": "Connecting",
"app.audioModal.connectingEchoTest": "Connecting to echo test",
"app.audioManager.joinedAudio": "You have joined the audio conference",
"app.audioManager.joinedEcho": "You have joined the echo test",
"app.audioManager.leftAudio": "You have left the audio conference",
@ -217,7 +216,6 @@
"app.audioManager.requestTimeout": "Error: There was a timeout in the request",
"app.audioManager.invalidTarget": "Error: Tried to request something to an invalid target",
"app.audioManager.mediaError": "Error: There was an error getting your media devices",
"app.audio.joinAudio": "Join Audio",
"app.audio.leaveAudio": "Leave Audio",
"app.audio.enterSessionLabel": "Enter Session",