Removed unused session vars logic
This commit is contained in:
parent
df6dd33c82
commit
debd8f714a
@ -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,
|
||||
|
@ -110,7 +110,6 @@ export default withModalMounter(withTracker(() => {
|
||||
const data = {
|
||||
children: <DefaultContent />,
|
||||
audioModalIsOpen: Session.get('audioModalIsOpen'),
|
||||
userWasInWebcam: Session.get('userWasInWebcam'),
|
||||
joinVideo: VideoService.joinVideo,
|
||||
};
|
||||
|
||||
|
@ -98,7 +98,6 @@ class VideoService {
|
||||
}
|
||||
|
||||
sendUserUnshareWebcam(cameraId) {
|
||||
Session.set('userWasInWebcam', true);
|
||||
makeCall('userUnshareWebcam', cameraId);
|
||||
}
|
||||
|
||||
|
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user