index.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
  6. <meta name="simplewebrtc-config-url" content="https://api.simplewebrtc.com/config/guest/<%= htmlWebpackPlugin.options.environment.talky %>" />
  7. <title><%= htmlWebpackPlugin.options.title %></title>
  8. <meta name="description" content="<%= htmlWebpackPlugin.options.environment.desc %>"/>
  9. <meta property="og:image" content="<%= htmlWebpackPlugin.options.environment.img %>"/>
  10. <link rel="stylesheet" href="style.css">
  11. </head>
  12. <body>
  13. <noscript>You need to enable JavaScript</noscript>
  14. <div id="root"></div>
  15. <template id="haircheck-header">
  16. <h2 style="text-align: center">Video / Chat / Screen Sharing</h2>
  17. </template>
  18. <template id="empty-peer-grid">
  19. <h2 style="text-align: center; color: rgba(68, 68, 68, 0.25)">There isn't anyone here (yet!)</h2>
  20. </template>
  21. <template id="empty-roster">
  22. <div></div>
  23. </template>
  24. <template id="homepage">
  25. <div class="container">
  26. <form class="create-room-form" method="GET" action="/">
  27. <span class="create-room-form-input-wrapper">
  28. <span class="domain"><%= htmlWebpackPlugin.options.environment.url %>/</span>
  29. <input type="text" name="room" placeholder="choose a room name" class="create-room-form-input"/>
  30. </span>
  31. <button class="create-room-form-button button button-default button-undefined" type="submit">
  32. Start
  33. </button>
  34. </form>
  35. </div>
  36. </template>
  37. <script type="text/javascript">
  38. const params = new URLSearchParams(window.location.search);
  39. SimpleWebRTC.run({
  40. roomName: params.get('room'),
  41. root: document.getElementById('root'),
  42. gridPlaceholder: () => SimpleWebRTC.loadTemplate('empty-peer-grid'),
  43. haircheckHeaderPlaceholder: () =>
  44. SimpleWebRTC.loadTemplate('haircheck-header'),
  45. emptyRosterPlaceholder: () => SimpleWebRTC.loadTemplate('empty-roster'),
  46. homepagePlaceholder: () => SimpleWebRTC.loadTemplate('homepage')
  47. });
  48. </script>
  49. </body>
  50. </html>