|
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>视频</title>
- <style>
- .video-container {
- width: 320px;
- height: 600px;
- border-radius: 20px;
- overflow: hidden;
- position: relative;
- background-color: #000;
- box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8);
- font-family: Arial, sans-serif;
- }
- .video-container video {
- width: 100%;
- height: 100%;
- object-fit: cover;
- display: block;
- }
- .video-container .next-button {
- position: absolute;
- bottom: 20px;
- right: 20px;
- background: rgba(255, 255, 255, 0.85);
- border: none;
- color: #000;
- font-size: 12px;
- font-weight: bold;
- padding: 6px 12px;
- border-radius: 50px;
- cursor: pointer;
- box-shadow: 0 4px 10px rgba(255, 255, 255, 0.3);
- transition: transform 0.3s, background 0.3s, opacity 0.3s;
- opacity: 0.5;
- }
- .video-container .next-button:hover {
- transform: translateY(-3px);
- background: rgba(255, 255, 255, 1);
- opacity: 1;
- }
- .video-container .volume-control {
- position: absolute;
- bottom: 30px;
- left: 20px;
- display: flex;
- flex-direction: column;
- align-items: center;
- gap: 10px;
- opacity: 0.5;
- transition: opacity 0.3s;
- }
- .video-container .volume-control:hover {
- opacity: 1;
- }
- .video-container .volume-slider {
- width: 80px;
- height: 5px;
- background: #ccc;
- border-radius: 5px;
- outline: none;
- appearance: none;
- cursor: pointer;
- }
- .video-container .volume-slider::-webkit-slider-thumb {
- appearance: none;
- width: 12px;
- height: 12px;
- background: #fff;
- border-radius: 50%;
- cursor: pointer;
- }
- .video-container .volume-slider {
- border: none;
- }
- </style>
- <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
- <script>
- const videoPlayer = document.getElementById('videoPlayer');
- const nextButton = document.getElementById('nextButton');
- const volumeSlider = document.getElementById('volumeSlider');
- const videoUrl = "https://hs3l.com/video/mei.php";
- function loadVideo() {
- videoPlayer.src = videoUrl;
- videoPlayer.play();
- }
- videoPlayer.addEventListener('ended', loadVideo);
- nextButton.addEventListener('click', loadVideo);
- videoPlayer.addEventListener('click', () => {
- videoPlayer.paused ? videoPlayer.play() : videoPlayer.pause();
- });
- videoPlayer.addEventListener('contextmenu', (e) => e.preventDefault());
- volumeSlider.addEventListener('input', () => {
- videoPlayer.volume = volumeSlider.value;
- videoPlayer.muted = videoPlayer.volume === 0;
- });
- loadVideo();
- </script>
- </head>
- <body>
- <div class="video-container">
- <video id="videoPlayer" autoplay muted playsinline>
- <source src="https://hs3l.com/video/mei.php" type="video/mp4">
- 您的浏览器不支持 HTML5 视频标签。
- </video>
- <div class="volume-control">
- <input id="volumeSlider" class="volume-slider" type="range" min="0" max="1" step="0.01" value="0">
- </div>
- <button class="next-button" id="nextButton">下一个</button>
- </div>
- </body>
- </html>
复制代码 调用api
- <video autoplay="autoplay" controls>
- <source src="https://hs3l.com/video/mei.php" type="video/mp4">
- </video>
复制代码 备用api
- <video autoplay="autoplay" controls>
- <source src="https://api.hs3l.com/video/mei.php" type="video/mp4">
- </video>
复制代码
|
免责声明
本站提供的一切软件、教程和内容信息仅限用于学习和研究,不得用于商业或者非法用途,否则,一切后果请用户自负;本站信息来自网络收集整理,版权争议与本站无关,您必须在下载后的24个小时之内,从您的电脑或手机中彻底删除相应的内容;如果您喜欢该内容,请支持正版,得到更好的服务;我们非常重视版权问题,如有侵权请与我们联系,敬请谅解!
|