Removed unused session vars logic

This commit is contained in:
Pedro Beschorner Marin 2019-11-27 10:09:44 -03:00
parent df6dd33c82
commit debd8f714a
4 changed files with 0 additions and 24 deletions

View File

@ -12,9 +12,7 @@ const propTypes = {
hideOverlay: PropTypes.bool,
swapLayout: PropTypes.bool,
disableVideo: PropTypes.bool,
userWasInWebcam: PropTypes.bool,
audioModalIsOpen: PropTypes.bool,
joinVideo: PropTypes.func,
webcamPlacement: PropTypes.string,
};
@ -23,9 +21,7 @@ const defaultProps = {
hideOverlay: true,
swapLayout: false,
disableVideo: false,
userWasInWebcam: false,
audioModalIsOpen: false,
joinVideo: null,
webcamPlacement: 'top',
};
@ -40,23 +36,6 @@ export default class Media extends Component {
window.dispatchEvent(new Event('resize'));
}
componentDidUpdate(prevProps) {
const {
userWasInWebcam,
audioModalIsOpen,
joinVideo,
} = this.props;
const {
audioModalIsOpen: oldAudioModalIsOpen,
} = prevProps;
if ((!audioModalIsOpen && oldAudioModalIsOpen) && userWasInWebcam) {
Session.set('userWasInWebcam', false);
joinVideo();
}
}
render() {
const {
swapLayout,

View File

@ -110,7 +110,6 @@ export default withModalMounter(withTracker(() => {
const data = {
children: <DefaultContent />,
audioModalIsOpen: Session.get('audioModalIsOpen'),
userWasInWebcam: Session.get('userWasInWebcam'),
joinVideo: VideoService.joinVideo,
};

View File

@ -98,7 +98,6 @@ class VideoService {
}
sendUserUnshareWebcam(cameraId) {
Session.set('userWasInWebcam', true);
makeCall('userUnshareWebcam', cameraId);
}

View File

@ -285,7 +285,6 @@ class VideoProvider extends Component {
// Unshare user webcam
if (this.sharedWebcam) {
this.unshareWebcam();
Session.set('userWasInWebcam', true);
}
Object.keys(this.webRtcPeers).forEach((id) => {