FY

找回密码
立即注册
搜索
发新帖

585

积分

0

好友

67

主题
发表于 2023-1-22 12:40:36 | 查看: 153| 回复: 0
  1. </html>
  2. <head>
  3.     <link href="https://vjs.zencdn.net/7.21.1/video-js.css" rel="stylesheet" />
  4.   
  5.     <!-- If you'd like to support IE8 (for Video.js versions prior to v7) -->
  6.     <!-- <script src="https://vjs.zencdn.net/ie8/1.1.2/videojs-ie8.min.js"></script> -->
  7.   </head>
  8.   <style>
  9.     .vjs-paused .vjs-big-play-button,
  10. .vjs-paused.vjs-has-started .vjs-big-play-button {
  11.     display: block;
  12. }
  13. .video-js .vjs-big-play-button{
  14.     font-size: 2.5em;
  15.     line-height: 2.3em;
  16.     height: 2.5em;
  17.     width: 2.5em;
  18.     -webkit-border-radius: 2.5em;
  19.     -moz-border-radius: 2.5em;
  20.     border-radius: 2.5em;
  21.     background-color: #73859f;
  22.     background-color: rgba(115,133,159,.5);
  23.     border-width: 0.15em;
  24.     margin-top: -1.25em;
  25.     margin-left: -1.75em;
  26. }
  27. /* 中间的播放箭头 */
  28. .vjs-big-play-button .vjs-icon-placeholder {
  29.     font-size: 1.63em;
  30. }
  31. /* 加载圆圈 */
  32. .vjs-loading-spinner {
  33.     font-size: 2.5em;
  34.     width: 2em;
  35.     height: 2em;
  36.     border-radius: 1em;
  37.     margin-top: -1em;
  38.     margin-left: -1.5em;
  39. }
  40. /* 点击屏幕切换播放/暂停 */
  41. .video-js.vjs-playing .vjs-tech {
  42.     pointer-events: auto;
  43. }
  44.   </style>
  45.   <body>
  46.     <video
  47.       id="my-video"
  48.      
  49.       class="video-js vjs-big-play-centered"
  50.       controls
  51.       preload="auto"
  52.       width="1024"
  53.       height="580"
  54.       poster="MY_VIDEO_POSTER.jpg"
  55.       data-setup="{}"
  56.       
  57.     >
  58.       <source src="1.mp4" type="video/mp4" />
  59.       <source src="MY_VIDEO.webm" type="video/webm" />
  60.       <p class="vjs-no-js">
  61.         To view this video please enable JavaScript, and consider upgrading to a
  62.         web browser that
  63.         <a href="https://videojs.com/html5-video-support/" target="_blank"
  64.           >supports HTML5 video</a
  65.         >
  66.       </p>
  67.     </video>
  68.   
  69.     <script src="https://vjs.zencdn.net/7.21.1/video.min.js"></script>
  70.   </body>
  71.   <html>
复制代码


您需要登录后才可以回帖 登录 | 立即注册

QQ|Archiver|手机版|小黑屋|fatsky

GMT+8, 2024-5-19 02:00 , Processed in 0.037979 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表