diff --git a/app/src/__tests__/Room.spec.js b/app/src/__tests__/Room.spec.js
index f62e62d..3c802d3 100644
--- a/app/src/__tests__/Room.spec.js
+++ b/app/src/__tests__/Room.spec.js
@@ -32,7 +32,7 @@ beforeEach(() =>
audioDevices : null,
audioInProgress : false,
audioOutputDevices : null,
- audioOutputInProgress : false,
+ audioOutputInProgress : false,
canSendMic : false,
canSendWebcam : false,
canShareFiles : false,
diff --git a/app/src/actions/meActions.js b/app/src/actions/meActions.js
index 9c350da..32c429d 100644
--- a/app/src/actions/meActions.js
+++ b/app/src/actions/meActions.js
@@ -51,10 +51,10 @@ export const setAudioDevices = (devices) =>
});
export const setAudioOutputDevices = (devices) =>
-({
- type : 'SET_AUDIO_OUTPUT_DEVICES',
- payload : { devices }
-});
+ ({
+ type : 'SET_AUDIO_OUTPUT_DEVICES',
+ payload : { devices }
+ });
export const setWebcamDevices = (devices) =>
({
@@ -75,10 +75,10 @@ export const setAudioInProgress = (flag) =>
});
export const setAudioOutputInProgress = (flag) =>
-({
- type : 'SET_AUDIO_OUTPUT_IN_PROGRESS',
- payload : { flag }
-});
+ ({
+ type : 'SET_AUDIO_OUTPUT_IN_PROGRESS',
+ payload : { flag }
+ });
export const setWebcamInProgress = (flag) =>
({
diff --git a/app/src/actions/settingsActions.js b/app/src/actions/settingsActions.js
index e66d437..9603eaf 100644
--- a/app/src/actions/settingsActions.js
+++ b/app/src/actions/settingsActions.js
@@ -5,10 +5,10 @@ export const setSelectedAudioDevice = (deviceId) =>
});
export const setSelectedAudioOutputDevice = (deviceId) =>
-({
- type : 'CHANGE_AUDIO_OUTPUT_DEVICE',
- payload : { deviceId }
-});
+ ({
+ type : 'CHANGE_AUDIO_OUTPUT_DEVICE',
+ payload : { deviceId }
+ });
export const setSelectedWebcamDevice = (deviceId) =>
({
diff --git a/app/src/components/PeerAudio/AudioPeers.js b/app/src/components/PeerAudio/AudioPeers.js
index 56d2a88..8109ac4 100644
--- a/app/src/components/PeerAudio/AudioPeers.js
+++ b/app/src/components/PeerAudio/AudioPeers.js
@@ -32,12 +32,13 @@ const AudioPeers = (props) =>
AudioPeers.propTypes =
{
- micConsumers : PropTypes.array
+ micConsumers : PropTypes.array,
+ audioOutputDevice : PropTypes.string
};
const mapStateToProps = (state) =>
({
- micConsumers : micConsumerSelector(state),
+ micConsumers : micConsumerSelector(state),
audioOutputDevice : settings.selectedAudioOutputDevice
});
diff --git a/app/src/components/PeerAudio/PeerAudio.js b/app/src/components/PeerAudio/PeerAudio.js
index accf1fe..d5ef982 100644
--- a/app/src/components/PeerAudio/PeerAudio.js
+++ b/app/src/components/PeerAudio/PeerAudio.js
@@ -63,8 +63,9 @@ export default class PeerAudio extends React.PureComponent
}
}
- _setOutputDevice(audioOutputDevice){
- if(this._audioOutputDevice === audioOutputDevice)
+ _setOutputDevice(audioOutputDevice)
+ {
+ if (this._audioOutputDevice === audioOutputDevice)
return;
this._audioOutputDevice = audioOutputDevice;
@@ -72,13 +73,12 @@ export default class PeerAudio extends React.PureComponent
const { audio } = this.refs;
if (audioOutputDevice && typeof audio.setSinkId === 'function')
- {
audio.setSinkId(audioOutputDevice);
- }
}
}
PeerAudio.propTypes =
{
- audioTrack : PropTypes.any
+ audioTrack : PropTypes.any,
+ audioOutputDevice : PropTypes.string
};
diff --git a/app/src/components/Settings/Settings.js b/app/src/components/Settings/Settings.js
index 2a9719d..c5fa353 100644
--- a/app/src/components/Settings/Settings.js
+++ b/app/src/components/Settings/Settings.js
@@ -254,7 +254,12 @@ const Settings = ({
{ audioOutputDevices.map((audioOutput, index) =>
{
return (
-
+
);
})}
diff --git a/app/src/reducers/settings.js b/app/src/reducers/settings.js
index 590ac8f..0be91a8 100644
--- a/app/src/reducers/settings.js
+++ b/app/src/reducers/settings.js
@@ -24,9 +24,9 @@ const settings = (state = initialState, action) =>
}
case 'CHANGE_AUDIO_OUTPUT_DEVICE':
- {
- return { ...state, selectedAudioOutputDevice: action.payload.deviceId };
- }
+ {
+ return { ...state, selectedAudioOutputDevice: action.payload.deviceId };
+ }
case 'SET_DISPLAY_NAME':
{