No Description

video.html 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta content="yes" name="apple-mobile-web-app-capable">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,minimum-scale=1.0,user-scalable=0" />
  7. <title>省钱攻略</title>
  8. <link rel="stylesheet" type="text/css" href="public/public_css.css"/>
  9. <script type="text/javascript" src="public/public.js"></script>
  10. <style type="text/css">
  11. body{
  12. background: url(image/bgVideo.png) no-repeat;
  13. width: 100%;
  14. }
  15. .liveplayer {
  16. position: absolute;
  17. top: 0;
  18. left: 0;
  19. right: 0;
  20. bottom: 0;
  21. }
  22. video {
  23. width: 100%;
  24. }
  25. .btn-div {
  26. width: 100%;
  27. height: 100%;
  28. position: fixed;
  29. top: 0;
  30. bottom: 0;
  31. right: 0;
  32. left: 0;
  33. margin: auto;
  34. display: flex;
  35. justify-content: center;
  36. align-items: center;
  37. }
  38. .btn{
  39. width: 1rem;
  40. height: 1rem;
  41. }
  42. .btn img{
  43. width: 100%;
  44. height: 100%;
  45. }
  46. </style>
  47. </head>
  48. <body>
  49. <div class="liveplayer">
  50. <video controls poster="image/bgVideo.png">
  51. <source src="video/liedou_taobao.mp4" type="video/mp4">
  52. </video>
  53. </div>
  54. <!--<div class="btn-div">
  55. <div class="btn"><img class="btnImg" src="image/play.png"/></div>
  56. </div>-->
  57. </body>
  58. </html>
  59. <script type="text/javascript">
  60. // var videoPlayer = (function() {
  61. // var $livePlayer = document.getElementsByClassName('liveplayer')[0];
  62. // var $video = document.getElementsByTagName('video')[0];
  63. // var $playBtn = document.getElementsByClassName('btn')[0];
  64. // var $btnImg = document.getElementsByClassName('btnImg')[0];
  65. //
  66. // var isIphone = navigator.userAgent.indexOf('iPhone');
  67. // if (isIphone != -1) {
  68. // $playBtn.addEventListener('click', function() {
  69. // $btnImg.setAttribute('src','image/suspend.png');
  70. // $video.setAttribute('controls','controls')
  71. // $livePlayer.style.display = 'block';
  72. // $video.style.display = 'block';
  73. // window.location="https://shengqian-viedo.oss-cn-beijing.aliyuncs.com/operation-video/liedou_taobao.mp4"
  74. // })
  75. // }
  76. // else {
  77. // $playBtn.addEventListener('click', function() {
  78. // $btnImg.setAttribute('src','image/suspend.png');
  79. // $video.setAttribute('controls','controls')
  80. // $livePlayer.style.display = 'block';
  81. // $video.style.display = 'block';
  82. // $video.play();
  83. // })
  84. // }
  85. //
  86. // $video.addEventListener("ended",function(){
  87. // //监听播放结束
  88. // $btnImg.setAttribute('src','image/play.png');
  89. // })
  90. // })()
  91. </script>