video.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!-- 视频页 -->
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <%- include('components/meta-head.html') %>
  6. <link rel="stylesheet" href="/css/insight.css" />
  7. <link rel="stylesheet" href="//unpkg.byted-static.com/xgplayer/3.0.9/dist/index.min.css" />
  8. </head>
  9. <body class="sticky">
  10. <%- include('components/site-header.html') %>
  11. <div class="container">
  12. <div class="wrapper">
  13. <div class="bread-crumb">
  14. <a href="/">伏羲学堂</a>
  15. <span><%= course.title%></span>
  16. </div>
  17. <div class="video-caption"><%= course.title%></div>
  18. <div class="video-wrap">
  19. <div class="video" id="fx_player">
  20. <img src="<%= curChapter.coverimg%>" alt="" />
  21. </div>
  22. <dl class="video-menus">
  23. <div class="header">目录</div>
  24. <ol class="menus-list">
  25. <% chapter.forEach(item => { %>
  26. <% if(item.current){ %>
  27. <li class="current"><%= item.title%></li>
  28. <% }else{ %>
  29. <li >
  30. <a href="<%= item.href%>"><%= item.title%></a>
  31. </li>
  32. <% } %>
  33. <% }) %>
  34. </ol>
  35. </dl>
  36. </div>
  37. </div>
  38. <%- include('components/course-section.html') %>
  39. </div>
  40. <%- include('components/site-footer.html') %>
  41. <script src="//unpkg.byted-static.com/xgplayer/3.0.9/dist/index.min.js"></script>
  42. <script src="//unpkg.byted-static.com/xgplayer-hls/3.0.9/dist/index.min.js"></script>
  43. <script src="/js/detail.js"></script>
  44. <script>
  45. let player = new Player({
  46. id: 'fx_player',
  47. volume: 0.3,
  48. url: '<%- curChapter.m3u8[2].url%>',
  49. poster: '<%= curChapter.coverimg%>',
  50. playsinline: true,
  51. lang: 'zh-cn',
  52. thumbnail: {
  53. pic_num: 44,
  54. width: 160,
  55. height: 90,
  56. col: 10,
  57. row: 10,
  58. urls: ['<%= curChapter.coverimg%>'],
  59. },
  60. // playbackRate: [0.5, 1, 1.25,1.5, 2],
  61. playbackRate: [2, 1.5, 1.25,1, 0.5],
  62. height: 466,
  63. width: 828,
  64. plugins: [window.HlsPlayer],
  65. i18n:[{
  66. LANG: 'zh-cn'
  67. }],
  68. definition: {
  69. defaultDefinition: '480p',
  70. },
  71. });
  72. player.emit('resourceReady',<%- JSON.stringify(curChapter.m3u8) %> );
  73. </script>
  74. </body>
  75. </html>