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-jaas.html 1.2KB

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src='external_api.js' async></script>
  5. <style>html, body, #jaas-container { height: 100%; }</style>
  6. <script type="text/javascript">
  7. function getRoomName(pathname) {
  8. const contextRootEndIndex = pathname.lastIndexOf('/');
  9. return pathname.substring(contextRootEndIndex + 1);
  10. }
  11. window.onload = () => {
  12. const jaasJwt = <!--#include virtual="/jaas-jwt" -->;
  13. const api = new JitsiMeetExternalAPI(
  14. window.location.host, {
  15. roomName: `${jaasJwt.tenant}/${getRoomName(window.location.pathname)}`,
  16. parentNode: document.querySelector('#jaas-container'),
  17. jwt: jaasJwt.token,
  18. e2eeKey: jaasJwt.e2eeKey
  19. });
  20. api.addListener('videoConferenceJoined', () => {
  21. if (jaasJwt.e2eeKey) {
  22. console.info('Toggling e2ee on!')
  23. api.executeCommand('toggleE2EE', true);
  24. }
  25. });
  26. }
  27. </script>
  28. </head>
  29. <body>
  30. <div id="jaas-container" />
  31. </body>
  32. </html>