Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const { render } = this.props;
const {
videoRoom,
isJoining,
userName,
roomName,
errorMessage,
screenTrack
} = this.state;
return render({
videoRoom,
userName,
roomName,
isVideoSupported: TwilioVideo.isSupported,
isScreenSharingSupported: Boolean(
navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia
),
isScreenSharingEnabled: Boolean(screenTrack),
canJoin: !isEmpty(userName) && !isEmpty(roomName),
isJoining,
onJoin: this.joinRoom,
onLeave: this.leaveRoom,
onShare: this.shareScreen,
onRoomNameChange: this.changeRoomName,
onUserNameChange: this.changeUserName,
errorMessage,
onErrorMessageHide: this.hideErrorMessage
});
}
}