archivos de configuracion, scripts y assets customizados de greenlight, scalelite y bigbluebutton
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

guest-wait.html 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Sala de Espera</title>
  5. <meta charset="UTF-8">
  6. <style>
  7. body {
  8. display: flex;
  9. justify-content: center;
  10. align-items: center;
  11. background: #06172A;
  12. height: 100vh;
  13. margin: 0;
  14. }
  15. #content {
  16. text-align: center;
  17. color: white;
  18. font-weight: bold;
  19. font-size: 24px;
  20. font-family: arial, sans-serif;
  21. }
  22. .spinner {
  23. margin: 20px auto;
  24. }
  25. .spinner .bounce1 {
  26. animation-delay: -0.32s;
  27. }
  28. .spinner .bounce2 {
  29. animation-delay: -0.16s;
  30. }
  31. .spinner > div {
  32. width: 30px;
  33. height: 30px;
  34. background-color: rgb(255, 255, 255);
  35. display: inline-block;
  36. border-radius: 100%;
  37. animation: 1.4s ease-in-out 0s infinite normal both running sk-bouncedelay;
  38. }
  39. @-webkit-keyframes sk-bouncedelay {
  40. 0%, 80%, 100% {
  41. -webkit-transform: scale(0)
  42. }
  43. 40% {
  44. -webkit-transform: scale(1.0)
  45. }
  46. }
  47. @keyframes sk-bouncedelay {
  48. 0%, 80%, 100% {
  49. -webkit-transform: scale(0);
  50. transform: scale(0);
  51. }
  52. 40% {
  53. -webkit-transform: scale(1.0);
  54. transform: scale(1.0);
  55. }
  56. }
  57. </style>
  58. <script src="lib/jquery-2.1.1.min.js" type="text/javascript"></script>
  59. <script type="text/javascript">
  60. function updateMessage(message) {
  61. $('#content > p').html(message);
  62. }
  63. function findSessionToken() {
  64. return location.search
  65. .substr(1)
  66. .split('&')
  67. .find(function(item) {
  68. return item.split('=')[0] === 'sessionToken'
  69. });
  70. };
  71. function fetchGuestWait(sessionToken) {
  72. const GUEST_WAIT_ENDPOINT = '/bigbluebutton/api/guestWait';
  73. return $.get(GUEST_WAIT_ENDPOINT, sessionToken.concat('&redirect=false'));
  74. };
  75. function pollGuestStatus(token, attempt, limit, everyMs) {
  76. setTimeout(function() {
  77. var REDIRECT_STATUSES = ['ALLOW', 'DENY'];
  78. if (attempt >= limit) {
  79. updateMessage('No respons from Moderator');
  80. return;
  81. }
  82. fetchGuestWait(token).always(function(data) {
  83. console.log("data=" + JSON.stringify(data));
  84. var status = data.response.guestStatus;
  85. if (REDIRECT_STATUSES.includes(status)) {
  86. window.location = data.response.url;
  87. return;
  88. }
  89. return pollGuestStatus(token, attempt + 1, limit, everyMs);
  90. })
  91. }, everyMs);
  92. };
  93. window.onload = function() {
  94. try {
  95. var ATTEMPT_EVERY_MS = 5000;
  96. var ATTEMPT_LIMIT = 100;
  97. var sessionToken = findSessionToken();
  98. if(!sessionToken) {
  99. updateMessage('No session Token received');
  100. return;
  101. }
  102. pollGuestStatus(sessionToken, 0, ATTEMPT_LIMIT, ATTEMPT_EVERY_MS);
  103. } catch (e) {
  104. console.error(e);
  105. updateMessage('Error: more details in the console');
  106. }
  107. };
  108. </script>
  109. </head>
  110. <body>
  111. <div id="content">
  112. <div class="spinner">
  113. <div class="bounce1"></div>
  114. <div class="bounce2"></div>
  115. <div class="bounce3"></div>
  116. </div>
  117. <p>Por favor, espere a que un moderador lo apruebe para unirse a la sala.</p>
  118. </div>
  119. </body>
  120. </html>