index.html 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>h.264 To fmp4</title>
  5. </head>
  6. <body>
  7. <h2>h.264 To fmp4</h2>
  8. <script type="text/javascript" src="wfs.js" ></script>
  9. <script src="https://cdn.bootcss.com/vConsole/3.2.0/vconsole.min.js"></script>
  10. <div class="wfsjs">
  11. <video id="video1" width="640" height="480" controls></video>
  12. <div class="ratio"></div>
  13. </div>
  14. <div class="wfsjs2">
  15. <video id="video2" width="640" height="480" controls></video>
  16. <div class="ratio2"></div>
  17. </div>
  18. <script>
  19. window.onload = function () {
  20. let vConsole = new VConsole();
  21. // //你打印的数据 比如
  22. console.log('test');
  23. if (Wfs.isSupported()) {
  24. var video1 = document.getElementById("video1"),
  25. wfs = new Wfs();
  26. wfs.attachMedia(video1,'ch1');
  27. var video2 = document.getElementById("video2"),
  28. wfs2 = new Wfs();
  29. wfs2.attachMedia(video2,'ch2');
  30. }
  31. };
  32. </script>
  33. </body>
  34. </html>