demo.html 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <style>
  9. body>#video {
  10. width: 100vw;
  11. height: 100vh;
  12. background: #000;
  13. text-align: center;
  14. }
  15. * {
  16. padding: 0;
  17. margin: 0;
  18. }
  19. </style>
  20. </head>
  21. <body>
  22. <div id="video"></div>
  23. <script src="./jessibuca-pro-multi.js"></script>
  24. <script>
  25. let urlString = window.location.href;
  26. // 获取 URL 中的参数部分
  27. let searchParams = new URLSearchParams(window.location.search);
  28. const url = searchParams.get('url')
  29. var jessibuca = new JessibucaPro({
  30. container: video,
  31. videoBuffer: 0.2, // 缓存时长
  32. isResize: true,
  33. text: "",
  34. loadingText: "加载中",
  35. useMSE: true,
  36. useSIMD: true,
  37. autoWasm: true,
  38. // debug: true,
  39. // debugLevel: "debug",
  40. controlAutoHide: true,
  41. showBandwidth: false, // 显示网速
  42. operateBtns: {
  43. fullscreen: true,
  44. screenshot: true,
  45. play: true,
  46. audio: true,
  47. },
  48. forceNoOffscreen: true,
  49. useWebFullScreen: true,
  50. isNotMute: false,
  51. loadingTimeoutReplayTimes: -1,
  52. heartTimeoutReplayTimes: -1,
  53. });
  54. jessibuca.play(url);
  55. </script>
  56. </body>
  57. </html>