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.

index.html 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <html itemscope itemtype="http://schema.org/Product" prefix="og: http://ogp.me/ns#" xmlns="http://www.w3.org/1999/html">
  2. <head>
  3. <meta charset="utf-8">
  4. <meta http-equiv="content-type" content="text/html;charset=utf-8">
  5. <!--#include virtual="base.html" -->
  6. <script>
  7. window.indexLoadedTime = window.performance.now();
  8. console.log("(TIME) index.html loaded:\t", indexLoadedTime);
  9. // XXX the code below listeners for errors and displays an error message
  10. // in the document body when any of the required files fails to load.
  11. // The intention is to prevent from displaying broken page.
  12. var criticalFiles = [
  13. "config.js",
  14. "utils.js",
  15. "do_external_connect.js",
  16. "interface_config.js",
  17. "logging_config.js",
  18. "lib-jitsi-meet.min.js",
  19. "app.bundle.min.js",
  20. "all.css"
  21. ];
  22. var loadErrHandler = function(e) {
  23. var target = e.target;
  24. // Error on <script> and <link>(CSS)
  25. // <script> will have .src and <link> .href
  26. var fileRef = (target.src ? target.src : target.href);
  27. if (("SCRIPT" === target.tagName || "LINK" === target.tagName)
  28. && criticalFiles.some(
  29. function(file) { return fileRef.indexOf(file) !== -1 })) {
  30. window.onload = function() {
  31. // The whole complex part below implements page reloads with
  32. // "exponential backoff". The retry attempt is passes as
  33. // "rCounter" query parameter
  34. var href = window.location.href;
  35. var retryMatch = href.match(/.+(\?|&)rCounter=(\d+)/);
  36. var retryCountStr = retryMatch ? retryMatch[2] : "0";
  37. var retryCount = Number.parseInt(retryCountStr);
  38. if (retryMatch == null) {
  39. var separator = href.indexOf("?") === -1 ? "?" : "&";
  40. var hashIdx = href.indexOf("#");
  41. if (hashIdx === -1) {
  42. href += separator + "rCounter=1";
  43. } else {
  44. var hashPart = href.substr(hashIdx);
  45. href = href.substr(0, hashIdx)
  46. + separator + "rCounter=1" + hashPart;
  47. }
  48. } else {
  49. var separator = retryMatch[1];
  50. href = href.replace(
  51. /(\?|&)rCounter=(\d+)/,
  52. separator + "rCounter=" + (retryCount + 1));
  53. }
  54. var delay = Math.pow(2, retryCount) * 2000;
  55. if (isNaN(delay) || delay < 2000 || delay > 60000)
  56. delay = 10000;
  57. document.body.innerHTML
  58. = "<div style='"
  59. + "position: absolute;top: 50%;left: 50%;"
  60. + "text-align: center;"
  61. + "transform: translate(-50%, -50%)'>"
  62. + "The application failed to load."
  63. + "<a id='showMore' style='"
  64. + "text-decoration: underline;"
  65. + "cursor: pointer'>more</a>"
  66. + "<div id='moreInfo' style='"
  67. + "display: none'>" + fileRef + "</div>"
  68. + "<br/> "
  69. + "The page should reload shortly... "
  70. + "<a href='" + href + "'"
  71. + " style='text-decoration: underline'>reload</a>"
  72. + "</div>";
  73. document.getElementById("showMore")
  74. .addEventListener('click', function () {
  75. document
  76. .getElementById("moreInfo")
  77. .setAttribute("style", "display: block;");
  78. });
  79. window.setTimeout(
  80. function () { window.location.replace(href); }, delay);
  81. };
  82. window.removeEventListener(
  83. 'error', loadErrHandler, true /* capture phase */);
  84. }
  85. };
  86. window.addEventListener(
  87. 'error', loadErrHandler, true /* capture phase type of listener */);
  88. </script>
  89. <script><!--#include virtual="/config.js" --></script><!-- adapt to your needs, i.e. set hosts and bosh path -->
  90. <script src="utils.js?v=1"></script>
  91. <!--#include virtual="connection_optimization/connection_optimization.html" -->
  92. <script src="connection_optimization/do_external_connect.js?v=1"></script>
  93. <script><!--#include virtual="/interface_config.js" --></script>
  94. <script><!--#include virtual="/logging_config.js" --></script>
  95. <script src="libs/lib-jitsi-meet.min.js?v=139"></script>
  96. <script src="libs/app.bundle.min.js?v=139"></script>
  97. <!--#include virtual="title.html" -->
  98. <link rel="stylesheet" href="css/all.css">
  99. <!--#include virtual="plugin.head.html" -->
  100. </head>
  101. <body>
  102. <div id="react"></div>
  103. <div id="keyboard-shortcuts" class="keyboard-shortcuts" style="display:none;">
  104. <div class="content">
  105. <ul id="keyboard-shortcuts-list" class="shortcuts-list">
  106. </ul>
  107. </div>
  108. </div>
  109. </body>
  110. </html>