Various lint and fixes
parent
66b513cf19
commit
0ed9d4db9b
|
|
@ -51,10 +51,10 @@ export const setAudioDevices = (devices) =>
|
|||
});
|
||||
|
||||
export const setAudioOutputDevices = (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 }
|
||||
});
|
||||
});
|
||||
|
||||
export const setWebcamInProgress = (flag) =>
|
||||
({
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ export const setSelectedAudioDevice = (deviceId) =>
|
|||
});
|
||||
|
||||
export const setSelectedAudioOutputDevice = (deviceId) =>
|
||||
({
|
||||
({
|
||||
type : 'CHANGE_AUDIO_OUTPUT_DEVICE',
|
||||
payload : { deviceId }
|
||||
});
|
||||
});
|
||||
|
||||
export const setSelectedWebcamDevice = (deviceId) =>
|
||||
({
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ const AudioPeers = (props) =>
|
|||
|
||||
AudioPeers.propTypes =
|
||||
{
|
||||
micConsumers : PropTypes.array
|
||||
micConsumers : PropTypes.array,
|
||||
audioOutputDevice : PropTypes.string
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) =>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -254,7 +254,12 @@ const Settings = ({
|
|||
{ audioOutputDevices.map((audioOutput, index) =>
|
||||
{
|
||||
return (
|
||||
<MenuItem key={index} value={audioOutput.deviceId}>{audioOutput.label}</MenuItem>
|
||||
<MenuItem
|
||||
key={index}
|
||||
value={audioOutput.deviceId}
|
||||
>
|
||||
{audioOutput.label}
|
||||
</MenuItem>
|
||||
);
|
||||
})}
|
||||
</Select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue