From 69677e49723d34b3c2ed8cd92ee9aae9b06a0e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Thu, 7 Nov 2019 10:01:26 +0100 Subject: [PATCH] Remove browser info for users. --- app/src/RoomClient.js | 1 - app/src/actions/meActions.js | 4 ++-- .../components/VideoContainers/VideoView.js | 22 ------------------- app/src/components/appPropTypes.js | 9 -------- app/src/index.js | 1 - app/src/reducers/me.js | 3 --- server/lib/Peer.js | 15 +------------ server/lib/Room.js | 5 +---- 8 files changed, 4 insertions(+), 56 deletions(-) diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index e07afbc..dfa4713 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -2024,7 +2024,6 @@ export default class RoomClient { displayName : displayName, picture : picture, - device : this._device, rtpCapabilities : this._mediasoupDevice.rtpCapabilities }); diff --git a/app/src/actions/meActions.js b/app/src/actions/meActions.js index d76002b..b704880 100644 --- a/app/src/actions/meActions.js +++ b/app/src/actions/meActions.js @@ -1,7 +1,7 @@ -export const setMe = ({ peerId, device, loginEnabled }) => +export const setMe = ({ peerId, loginEnabled }) => ({ type : 'SET_ME', - payload : { peerId, device, loginEnabled } + payload : { peerId, loginEnabled } }); export const loggedIn = (flag) => diff --git a/app/src/components/VideoContainers/VideoView.js b/app/src/components/VideoContainers/VideoView.js index b90cc81..88b6ecc 100644 --- a/app/src/components/VideoContainers/VideoView.js +++ b/app/src/components/VideoContainers/VideoView.js @@ -2,7 +2,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { withStyles } from '@material-ui/core/styles'; -import * as appPropTypes from '../appPropTypes'; import EditableInput from '../Controls/EditableInput'; const styles = (theme) => @@ -105,16 +104,6 @@ const styles = (theme) => { backgroundColor : 'rgb(174, 255, 0, 0.25)' } - }, - deviceInfo : - { - '& span' : - { - userSelect : 'none', - pointerEvents : 'none', - fontSize : 11, - color : 'rgba(255, 255, 255, 0.55)' - } } }); @@ -143,7 +132,6 @@ class VideoView extends React.PureComponent const { isMe, isScreen, - peer, displayName, showPeerInfo, videoContain, @@ -204,14 +192,6 @@ class VideoView extends React.PureComponent {displayName} } - - { advancedMode && -
- - {peer.device.name} {Math.floor(peer.device.version) || null} - -
- } } @@ -315,8 +295,6 @@ VideoView.propTypes = { isMe : PropTypes.bool, isScreen : PropTypes.bool, - peer : PropTypes.oneOfType( - [ appPropTypes.Me, appPropTypes.Peer ]), displayName : PropTypes.string, showPeerInfo : PropTypes.bool, videoContain : PropTypes.bool, diff --git a/app/src/components/appPropTypes.js b/app/src/components/appPropTypes.js index 8473204..2e928d8 100644 --- a/app/src/components/appPropTypes.js +++ b/app/src/components/appPropTypes.js @@ -8,17 +8,9 @@ export const Room = PropTypes.shape( activeSpeakerId : PropTypes.string }); -export const Device = PropTypes.shape( - { - flag : PropTypes.string.isRequired, - name : PropTypes.string.isRequired, - version : PropTypes.string - }); - export const Me = PropTypes.shape( { id : PropTypes.string.isRequired, - device : Device.isRequired, canSendMic : PropTypes.bool.isRequired, canSendWebcam : PropTypes.bool.isRequired, webcamInProgress : PropTypes.bool.isRequired @@ -39,7 +31,6 @@ export const Peer = PropTypes.shape( { id : PropTypes.string.isRequired, displayName : PropTypes.string, - device : Device.isRequired, consumers : PropTypes.arrayOf(PropTypes.string).isRequired }); diff --git a/app/src/index.js b/app/src/index.js index e433357..f5d7a44 100644 --- a/app/src/index.js +++ b/app/src/index.js @@ -98,7 +98,6 @@ function run() store.dispatch( meActions.setMe({ peerId, - device, loginEnabled : window.config.loginEnabled }) ); diff --git a/app/src/reducers/me.js b/app/src/reducers/me.js index de8cd6d..e80375a 100644 --- a/app/src/reducers/me.js +++ b/app/src/reducers/me.js @@ -1,7 +1,6 @@ const initialState = { id : null, - device : null, picture : null, canSendMic : false, canSendWebcam : false, @@ -27,14 +26,12 @@ const me = (state = initialState, action) => { const { peerId, - device, loginEnabled } = action.payload; return { ...state, id : peerId, - device, loginEnabled }; } diff --git a/server/lib/Peer.js b/server/lib/Peer.js index 9253aa9..cce62aa 100644 --- a/server/lib/Peer.js +++ b/server/lib/Peer.js @@ -30,8 +30,6 @@ class Peer extends EventEmitter this._email = null; - this._device = null; - this._rtpCapabilities = null; this._raisedHand = false; @@ -229,16 +227,6 @@ class Peer extends EventEmitter this._email = email; } - get device() - { - return this._device; - } - - set device(device) - { - this._device = device; - } - get rtpCapabilities() { return this._rtpCapabilities; @@ -331,8 +319,7 @@ class Peer extends EventEmitter { id : this.id, displayName : this.displayName, - picture : this.picture, - device : this.device + picture : this.picture }; return peerInfo; diff --git a/server/lib/Room.js b/server/lib/Room.js index 145e5a2..c544768 100644 --- a/server/lib/Room.js +++ b/server/lib/Room.js @@ -412,14 +412,12 @@ class Room extends EventEmitter const { displayName, picture, - device, rtpCapabilities } = request.data; // Store client data into the Peer data object. peer.displayName = displayName; peer.picture = picture; - peer.device = device; peer.rtpCapabilities = rtpCapabilities; // Tell the new Peer about already joined Peers. @@ -456,8 +454,7 @@ class Room extends EventEmitter { id : peer.id, displayName : displayName, - picture : picture, - device : device + picture : picture }, true );