Newer
Older
operation_web / static / video / video.html
@zhangqy zhangqy on 28 Apr 2020 1 KB 阶段性开发以及修改
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>video</title>
  7. <link href="https://vjs.zencdn.net/7.4.1/video-js.css" rel="stylesheet">
  8. <script src="https://vjs.zencdn.net/7.4.1/video.js"></script>
  9. <script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.15.0/videojs-contrib-hls.min.js"
  10. type="text/javascript"></script>
  11. <!-- videojs-contrib-hls 用于在电脑端播放 如果只需手机播放可以不引入 -->
  12. </head>
  13.  
  14. <body>
  15. <style>
  16. html,
  17. body {
  18. width: 100%;
  19. height: 100%;
  20. padding: 0;
  21. margin: 0;
  22. }
  23.  
  24. * {
  25. padding: 0;
  26. margin: 0;
  27. }
  28.  
  29. .video-js .vjs-tech {
  30. position: relative !important;
  31. }
  32.  
  33. #myVideo {
  34. width: 300px !important;
  35. height: 150px !important;
  36. }
  37.  
  38. /* .video-js {
  39. width: 300px;
  40. height: 150px;
  41. } */
  42.  
  43. </style>
  44. <div>
  45. <video id="myVideo" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" data-setup='{}'>
  46. <source id="source" src="http://132.232.115.20:8300/videoSurveillance/xinzhongxin_main.m3u8"
  47. type="application/x-mpegURL">
  48. </source>
  49. </video>
  50. </div>
  51. <!--<div class="qiehuan" style="width:100px;height: 100px;background: red;margin:0 auto;line-height: 100px;color:#fff;text-align: center">切换视频</div>-->
  52. </body>
  53.  
  54. </html>