Skip to content
Snippets Groups Projects
Commit f4762132 authored by Tainan Felipe's avatar Tainan Felipe
Browse files

Move guest-wait.html to bbb-html5 package

parent a9606219
No related branches found
No related tags found
No related merge requests found
<!DOCTYPE html>
<html>
<head>
<title>Guest Lobby</title>
<meta charset="UTF-8">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
background: #06172A;
height: 100vh;
margin: 0;
}
#content {
text-align: center;
color: white;
font-weight: bold;
font-size: 24px;
font-family: arial, sans-serif;
}
.spinner {
margin: 20px auto;
}
.spinner .bounce1 {
animation-delay: -0.32s;
}
.spinner .bounce2 {
animation-delay: -0.16s;
}
.spinner > div {
width: 30px;
height: 30px;
background-color: rgb(255, 255, 255);
display: inline-block;
border-radius: 100%;
animation: 1.4s ease-in-out 0s infinite normal both running sk-bouncedelay;
}
@-webkit-keyframes sk-bouncedelay {
0%, 80%, 100% {
-webkit-transform: scale(0)
}
40% {
-webkit-transform: scale(1.0)
}
}
@keyframes sk-bouncedelay {
0%, 80%, 100% {
-webkit-transform: scale(0);
transform: scale(0);
}
40% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
}
}
</style>
<script src="lib/jquery-2.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
function updateMessage(message) {
$('#content > p').html(message);
}
function findSessionToken() {
return location.search
.substr(1)
.split('&')
.find(function(item) {
return item.split('=')[0] === 'sessionToken'
});
};
function fetchGuestWait(sessionToken) {
const GUEST_WAIT_ENDPOINT = '/bigbluebutton/api/guestWait';
return $.get(GUEST_WAIT_ENDPOINT, sessionToken.concat('&redirect=false'));
};
function pollGuestStatus(token, attempt, limit, everyMs) {
setTimeout(function() {
var REDIRECT_STATUSES = ['ALLOW', 'DENY'];
if (attempt >= limit) {
updateMessage('No respons from Moderator');
return;
}
fetchGuestWait(token).always(function(data) {
console.log("data=" + JSON.stringify(data));
var status = data.response.guestStatus;
if (REDIRECT_STATUSES.includes(status)) {
window.location = data.response.url;
return;
}
return pollGuestStatus(token, attempt + 1, limit, everyMs);
})
}, everyMs);
};
window.onload = function() {
try {
var ATTEMPT_EVERY_MS = 5000;
var ATTEMPT_LIMIT = 100;
var sessionToken = findSessionToken();
if(!sessionToken) {
updateMessage('No session Token received');
return;
}
pollGuestStatus(sessionToken, 0, ATTEMPT_LIMIT, ATTEMPT_EVERY_MS);
} catch (e) {
console.error(e);
updateMessage('Error: more details in the console');
}
};
</script>
</head>
<body>
<div id="content">
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
<p>Please wait for a moderator to approve you joining the meeting.</p>
</div>
</body>
</html>
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<!DOCTYPE html>
<html>
<head>
<title>Guest Lobby</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style></style>
<meta charset="UTF-8">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
background: #06172A;
height: 100vh;
margin: 0;
}
#content {
text-align: center;
color: white;
font-weight: bold;
font-size: 24px;
font-family: arial, sans-serif;
}
.spinner {
margin: 20px auto;
}
.spinner .bounce1 {
animation-delay: -0.32s;
}
.spinner .bounce2 {
animation-delay: -0.16s;
}
.spinner > div {
width: 30px;
height: 30px;
background-color: rgb(255, 255, 255);
display: inline-block;
border-radius: 100%;
animation: 1.4s ease-in-out 0s infinite normal both running sk-bouncedelay;
}
@-webkit-keyframes sk-bouncedelay {
0%, 80%, 100% {
-webkit-transform: scale(0)
}
40% {
-webkit-transform: scale(1.0)
}
}
@keyframes sk-bouncedelay {
0%, 80%, 100% {
-webkit-transform: scale(0);
transform: scale(0);
}
40% {
-webkit-transform: scale(1.0);
transform: scale(1.0);
}
}
</style>
<script src="compatibility/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="lib/jquery-2.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
function updateMessage(message) {
......@@ -34,7 +85,7 @@
if (attempt >= limit) {
updateMessage('TIMEOUT_MESSAGE_HERE');
updateMessage('No respons from Moderator');
return;
}
......@@ -60,22 +111,26 @@
var sessionToken = findSessionToken();
if(!sessionToken) {
updateMessage('NO_SESSION_TOKEN_MESSAGE');
updateMessage('No session Token received');
return;
}
pollGuestStatus(sessionToken, 0, ATTEMPT_LIMIT, ATTEMPT_EVERY_MS);
} catch (e) {
console.error(e);
updateMessage('GENERIC_ERROR_MESSAGE');
updateMessage('Error: more details in the console');
}
};
</script>
</head>
<body>
<div id="banner"></div>
<div id="content">
<div class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
<p>Please wait for a moderator to approve you joining the meeting.</p>
</div>
</body>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment