index.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <html>
  2. <head>
  3. <title>SRS</title>
  4. <meta charset="utf-8">
  5. </head>
  6. <body>
  7. <h3><a href="https://github.com/ossrs/signaling">Signaling</a> works!</h3>
  8. <p>
  9. Run demo for <a class="srs_demo" href="one2one.html?autostart=true">WebRTC: One to One over SFU(SRS)</a><br/>
  10. 点击进入<a class="srs_demo" href="one2one.html?autostart=true">SRS一对一通话演示</a>
  11. </p>
  12. <p>
  13. Run demo for <a class="srs_demo" href="room.html?autostart=true">WebRTC: Video Room over SFU(SRS)</a><br/>
  14. 点击进入<a class="srs_demo" href="room.html?autostart=true">SRS多人通话演示</a>
  15. </p>
  16. <script>
  17. let roomName = Number(parseInt(new Date().getTime()*Math.random()*100)).toString(16).slice(0, 7);
  18. let elems = document.getElementsByClassName('srs_demo');
  19. for (var i = 0; i < elems.length; i++) {
  20. let elem = elems.item(i);
  21. // Use random room.
  22. let href = elem.getAttribute('href') + '&room=' + roomName;
  23. // For run demos on SRS http server.
  24. if (window.location.port === '8080') {
  25. href += '&wsp=1989';
  26. }
  27. elem.setAttribute('href', href);
  28. }
  29. </script>
  30. </body>