Various lint and fixes
parent
66b513cf19
commit
0ed9d4db9b
|
|
@ -32,7 +32,7 @@ beforeEach(() =>
|
||||||
audioDevices : null,
|
audioDevices : null,
|
||||||
audioInProgress : false,
|
audioInProgress : false,
|
||||||
audioOutputDevices : null,
|
audioOutputDevices : null,
|
||||||
audioOutputInProgress : false,
|
audioOutputInProgress : false,
|
||||||
canSendMic : false,
|
canSendMic : false,
|
||||||
canSendWebcam : false,
|
canSendWebcam : false,
|
||||||
canShareFiles : false,
|
canShareFiles : false,
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,10 @@ export const setAudioDevices = (devices) =>
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setAudioOutputDevices = (devices) =>
|
export const setAudioOutputDevices = (devices) =>
|
||||||
({
|
({
|
||||||
type : 'SET_AUDIO_OUTPUT_DEVICES',
|
type : 'SET_AUDIO_OUTPUT_DEVICES',
|
||||||
payload : { devices }
|
payload : { devices }
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setWebcamDevices = (devices) =>
|
export const setWebcamDevices = (devices) =>
|
||||||
({
|
({
|
||||||
|
|
@ -75,10 +75,10 @@ export const setAudioInProgress = (flag) =>
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setAudioOutputInProgress = (flag) =>
|
export const setAudioOutputInProgress = (flag) =>
|
||||||
({
|
({
|
||||||
type : 'SET_AUDIO_OUTPUT_IN_PROGRESS',
|
type : 'SET_AUDIO_OUTPUT_IN_PROGRESS',
|
||||||
payload : { flag }
|
payload : { flag }
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setWebcamInProgress = (flag) =>
|
export const setWebcamInProgress = (flag) =>
|
||||||
({
|
({
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ export const setSelectedAudioDevice = (deviceId) =>
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setSelectedAudioOutputDevice = (deviceId) =>
|
export const setSelectedAudioOutputDevice = (deviceId) =>
|
||||||
({
|
({
|
||||||
type : 'CHANGE_AUDIO_OUTPUT_DEVICE',
|
type : 'CHANGE_AUDIO_OUTPUT_DEVICE',
|
||||||
payload : { deviceId }
|
payload : { deviceId }
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setSelectedWebcamDevice = (deviceId) =>
|
export const setSelectedWebcamDevice = (deviceId) =>
|
||||||
({
|
({
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,13 @@ const AudioPeers = (props) =>
|
||||||
|
|
||||||
AudioPeers.propTypes =
|
AudioPeers.propTypes =
|
||||||
{
|
{
|
||||||
micConsumers : PropTypes.array
|
micConsumers : PropTypes.array,
|
||||||
|
audioOutputDevice : PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
||||||
const mapStateToProps = (state) =>
|
const mapStateToProps = (state) =>
|
||||||
({
|
({
|
||||||
micConsumers : micConsumerSelector(state),
|
micConsumers : micConsumerSelector(state),
|
||||||
audioOutputDevice : settings.selectedAudioOutputDevice
|
audioOutputDevice : settings.selectedAudioOutputDevice
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,8 +63,9 @@ export default class PeerAudio extends React.PureComponent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_setOutputDevice(audioOutputDevice){
|
_setOutputDevice(audioOutputDevice)
|
||||||
if(this._audioOutputDevice === audioOutputDevice)
|
{
|
||||||
|
if (this._audioOutputDevice === audioOutputDevice)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this._audioOutputDevice = audioOutputDevice;
|
this._audioOutputDevice = audioOutputDevice;
|
||||||
|
|
@ -72,13 +73,12 @@ export default class PeerAudio extends React.PureComponent
|
||||||
const { audio } = this.refs;
|
const { audio } = this.refs;
|
||||||
|
|
||||||
if (audioOutputDevice && typeof audio.setSinkId === 'function')
|
if (audioOutputDevice && typeof audio.setSinkId === 'function')
|
||||||
{
|
|
||||||
audio.setSinkId(audioOutputDevice);
|
audio.setSinkId(audioOutputDevice);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PeerAudio.propTypes =
|
PeerAudio.propTypes =
|
||||||
{
|
{
|
||||||
audioTrack : PropTypes.any
|
audioTrack : PropTypes.any,
|
||||||
|
audioOutputDevice : PropTypes.string
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -254,7 +254,12 @@ const Settings = ({
|
||||||
{ audioOutputDevices.map((audioOutput, index) =>
|
{ audioOutputDevices.map((audioOutput, index) =>
|
||||||
{
|
{
|
||||||
return (
|
return (
|
||||||
<MenuItem key={index} value={audioOutput.deviceId}>{audioOutput.label}</MenuItem>
|
<MenuItem
|
||||||
|
key={index}
|
||||||
|
value={audioOutput.deviceId}
|
||||||
|
>
|
||||||
|
{audioOutput.label}
|
||||||
|
</MenuItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Select>
|
</Select>
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@ const settings = (state = initialState, action) =>
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'CHANGE_AUDIO_OUTPUT_DEVICE':
|
case 'CHANGE_AUDIO_OUTPUT_DEVICE':
|
||||||
{
|
{
|
||||||
return { ...state, selectedAudioOutputDevice: action.payload.deviceId };
|
return { ...state, selectedAudioOutputDevice: action.payload.deviceId };
|
||||||
}
|
}
|
||||||
|
|
||||||
case 'SET_DISPLAY_NAME':
|
case 'SET_DISPLAY_NAME':
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue