Some tests.

master
Håvar Aambø Fosstveit 2019-10-24 09:03:30 +02:00
parent a8149d29d8
commit bf754d4797
4 changed files with 37 additions and 13 deletions

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Multiparty Meeting</title>
</head>
<body>
<script type='text/javascript'>
window.opener.receiveFromChildWindow('Data from child window!');
window.close();
</script>
</body>
</html>

View File

@ -323,6 +323,11 @@ export default class RoomClient
this._loginWindow.close();
}
receiveFromChildWindow(data)
{
logger.debug('receiveFromChildWindow() | [data:"%o"]', data);
}
_soundNotification()
{
const alertPromise = this._soundAlert.play();

View File

@ -54,6 +54,7 @@ const styles = (theme) =>
const JoinDialog = ({
roomClient,
displayName,
loginEnabled,
changeDisplayName,
classes
}) =>
@ -119,16 +120,18 @@ const JoinDialog = ({
margin='normal'
/>
<DialogActions>
<Button
onClick={() =>
{
roomClient.join({ joinVideo: false });
}}
variant='contained'
color='secondary'
>
Sign in
</Button>
{ loginEnabled &&
<Button
onClick={() =>
{
roomClient.login();
}}
variant='contained'
color='secondary'
>
Sign in
</Button>
}
<Button
onClick={() =>
{
@ -159,6 +162,7 @@ JoinDialog.propTypes =
{
roomClient : PropTypes.any.isRequired,
displayName : PropTypes.string.isRequired,
loginEnabled : PropTypes.string.isRequired,
changeDisplayName : PropTypes.func.isRequired,
classes : PropTypes.object.isRequired
};
@ -166,7 +170,8 @@ JoinDialog.propTypes =
const mapStateToProps = (state) =>
{
return {
displayName : state.settings.displayName
displayName : state.settings.displayName,
loginEnabled : state.me.loginEnabled
};
};

View File

@ -282,7 +282,7 @@ async function setupAuth(oidcIssuer)
room.peerAuthenticated(state.peerId);
const socket = io.sockets.socket(state.id);
const socket = io.sockets.sockets[state.id];
if (socket)
{
@ -297,7 +297,7 @@ async function setupAuth(oidcIssuer)
});
}
res.send('');
res.sendFile(`${__dirname}/public/authCallback.html`);
}
);
}