From 6d9ebacee3da2f0608bec81275570cafa821e913 Mon Sep 17 00:00:00 2001 From: Stefan Otto Date: Tue, 13 Nov 2018 15:41:53 +0100 Subject: [PATCH] removed setCanChangeWebcam becaus not needed and this fixes the bug with unable to select camara if only 1 webcam is connected --- app/lib/RoomClient.js | 2 -- app/lib/components/Settings.jsx | 11 ++--------- app/lib/components/appPropTypes.js | 1 - app/lib/redux/STATE.md | 1 - app/lib/redux/stateActions.js | 8 -------- 5 files changed, 2 insertions(+), 21 deletions(-) diff --git a/app/lib/RoomClient.js b/app/lib/RoomClient.js index 9536e74..086a35e 100644 --- a/app/lib/RoomClient.js +++ b/app/lib/RoomClient.js @@ -1730,8 +1730,6 @@ export default class RoomClient else if (!this._webcams.has(currentWebcamId)) this._webcam.device = array[0]; - this._dispatch( - stateActions.setCanChangeWebcam(len >= 2)); if (len >= 1) this._dispatch( stateActions.setWebcamDevices(this._webcams)); diff --git a/app/lib/components/Settings.jsx b/app/lib/components/Settings.jsx index d0d3572..b27a20f 100644 --- a/app/lib/components/Settings.jsx +++ b/app/lib/components/Settings.jsx @@ -22,12 +22,6 @@ const Settings = ({ }) => { let webcams; - let webcamText; - - if (me.canChangeWebcam) - webcamText = 'Select camera'; - else - webcamText = 'Unable to select camera'; if (me.webcamDevices) webcams = Array.from(me.webcamDevices.values()); @@ -51,13 +45,12 @@ const Settings = ({
handleChangeWebcam(webcam.value)} - placeholder={webcamText} + placeholder={'Select camera'} /> - + }; }; -export const setCanChangeWebcam = (flag) => -{ - return { - type : 'SET_CAN_CHANGE_WEBCAM', - payload : flag - }; -}; - export const setWebcamDevices = (devices) => { return {