风萧 发表于 2026-8-26 05:01:05

抖音小姐姐佳佳酱的舞蹈秀合集

<style type="text/css">
.video-playlist-container {
    max-width: 800px;
    margin: 15px auto;
    font-family: "Microsoft YaHei", sans-serif;
    background: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.video-main {
    position: relative;
    background: #000;
}
.video-main video {
    width: 100%;
    display: block;
    max-height: 500px;
}
.video-info-bar {
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    color: #fff;
    padding: 15px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
}
.video-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}
.video-index {
    font-size: 12px;
    opacity: 0.8;
}
.video-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #222;
    color: #fff;
}
.control-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.ctrl-btn {
    background: #444;
    border: none;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}
.ctrl-btn:hover { background: #666; }
.ctrl-btn.active { background: #e74c3c; }
.playlist {
    max-height: 280px;
    overflow-y: auto;
    background: #1a1a1a;
}
.playlist-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    cursor: pointer;
    transition: all 0.2s;
    color: #ccc;
}
.playlist-item:hover { background: #2a2a2a; }
.playlist-item.playing {
    background: linear-gradient(90deg, #c0392b 0%, #e74c3c 100%);
    color: #fff;
}
.playlist-item.played { opacity: 0.6; }
.item-index {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 12px;
    flex-shrink: 0;
}
.playlist-item.playing .item-index {
    background: #fff;
    color: #e74c3c;
}
.item-info { flex: 1; }
.item-title {
    font-size: 14px;
    margin-bottom: 3px;
}
.item-duration {
    font-size: 11px;
    opacity: 0.7;
}
.playing-indicator {
    margin-left: 10px;
    font-size: 12px;
}
.playlist::-webkit-scrollbar { width: 6px; }
.playlist::-webkit-scrollbar-track { background: #1a1a1a; }
.playlist::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
@media (max-width: 600px) {
    .video-title { font-size: 14px; }
    .playlist-item { padding: 10px; }
}
</style>

<div class="video-playlist-container">
    <div class="video-main">
      <div class="video-info-bar">
            <div class="video-title" id="videoTitle">佳佳酱的舞蹈秀合集</div>
            <div class="video-index" id="videoIndex">第 1 集 / 共 N 集</div>
      </div>
      <video id="mainVideo" controls preload="metadata" playsinline webkit-playsinline>
            您的浏览器不支持HTML5视频播放,请升级浏览器。
      </video>
    </div>
    <div class="video-controls-bar">
      <div class="control-group">
            <button class="ctrl-btn" onclick="prevVideo()">⏮ 上一集</button>
            <button class="ctrl-btn" onclick="nextVideo()">下一集 ⏭</button>
      </div>
      <div class="control-group">
            <button class="ctrl-btn active" id="autoPlayBtn" onclick="toggleAutoPlay()">🔁 连播: 开</button>
            <button class="ctrl-btn" id="loopBtn" onclick="toggleLoop()">🔂 循环: 关</button>
      </div>
    </div>
    <div class="playlist" id="playlist"></div>
</div>

<script type="text/javascript">
// ======== 视频列表配置(替换为你自己的视频地址)========
var videoList = [
    {
      title: "第一集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6753252004237151502-%23%E4%BD%A0%E4%BB%8A%E5%A4%A9%E7%9C%9F%E5%A5%BD%E7%9C%8B%20%E6%88%91%E4%B8%8D%E7%AE%A1%E6%88%91%E5%8A%AA%E5%8A%9B%E7%BC%96%E7%9A%84%E8%88%9E%EF%BC%8C%E5%BE%97%E5%86%8D%E5%8F%91%E4%B8%80%E6%AC%A1.mp4",
      duration: ""
    },
    {
      title: "第二集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6760297631542512899-%E4%BB%8A%E6%97%A5%E4%BB%BD%E3%80%82%23%E6%B3%AB%E9%9B%85%20%E6%9C%80%E7%88%B1%E7%9A%84%E6%B3%AB%E9%9B%85.mp4",
      duration: ""
    },
    {
      title: "第三集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6761408668605992204-%E5%88%86%E4%BA%AB%E4%B8%80%E5%8F%AA%E8%B6%85%E7%BA%A7%E9%80%82%E5%90%88%E5%A5%B3%E5%AD%A9%E5%AD%90%E8%B7%B3%E7%9A%84%E8%88%9E%E8%B9%88%E3%80%82%23%E8%88%9E%E8%B9%88.mp4",
      duration: ""
    },
    {
      title: "第四集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6762838899585830148-%E5%91%A8%E6%97%A5JAZZ%20%E5%9F%BA%E7%A1%80%E8%AF%BE%E7%A8%8B%23jiajia%E7%BC%96%E8%88%9E%20%E7%9C%8B%E7%9C%8B%E6%88%91%E4%BB%AC%E5%B7%A5%E4%BD%9C%E5%AE%A4%E7%9A%84%E5%A4%A7%E9%95%BF%E8%85%BF%E5%A6%B9%E5%A6%B9%23%E6%88%91%E5%B0%B1%E6%98%AF%E4%B8%89%E4%BA%BF%E5%88%86%E4%B9%8B%E4%B8%80.mp4",
      duration: ""
    },
    {
      title: "第五集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6763622574736870668-%E7%BB%99%E5%A4%A7%E5%AE%B6%E4%BB%8B%E7%BB%8D%E4%B8%80%E4%B8%8B%E6%88%91%E7%9A%84%E5%A7%90%E5%A6%B9%23jiajia%E7%BC%96%E8%88%9E.mp4",
      duration: ""
    },
    {
      title: "第六集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6766096617092189452-%23%E4%BD%B3%E4%BD%B3%E7%BC%96%E8%88%9E%20%E6%9C%80%E6%96%B0%E7%BC%96%E8%88%9E%EF%BC%8C%E5%A4%A9%E5%A4%A9%E8%B7%B3%E8%88%9E%E7%9A%84%E6%88%91%E6%84%9F%E5%8A%A8%E4%BA%86%E8%87%AA%E5%B7%B1.mp4",
      duration: ""
    },
    {
      title: "第七集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6766608638363585804-%23%E4%BD%B3%E4%BD%B3%E7%BC%96%E8%88%9E%20%E4%BB%8A%E6%97%A5%E4%BB%BD%E7%88%B5%E5%A3%AB%E5%9F%BA%E6%9C%AC%E5%8A%9F%E5%B0%8F%E7%BB%84%E5%90%88.mp4",
      duration: ""
    },
    {
      title: "第八集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6767206733522767116-%23%E5%9D%8F%E5%A5%B3%E5%AD%A9%20%E6%9A%B4%E9%9C%B2%E5%B9%B4%E9%BE%84%E7%9A%84%E6%AD%8C%EF%BC%8C%E6%9C%89%E8%B0%81%E5%90%AC%E8%BF%87%E7%9A%84%E5%90%97%20%E5%87%AF%E8%BF%99%E6%AC%A1%E6%89%AE%E6%BC%94%E6%88%91%E7%9A%84%E7%94%B7%E4%BC%B4%E5%95%A6.mp4",
      duration: ""
    },
    {
      title: "第九集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6767722852520070411-%23%E4%BD%B3%E4%BD%B3%E7%BC%96%E8%88%9E%20%E6%96%B0%E7%9A%84%E7%BC%96%E8%88%9E%E5%8F%AA%E8%83%BD%E7%94%A8%E8%BF%99%E4%B8%AA%E9%9F%B3%E4%B9%90%E3%80%82%E5%A4%A7%E5%86%AC%E5%A4%A9%E6%9D%A5%E4%B8%8A%E6%88%91%E8%AF%BE%E7%9A%84%E5%AE%9D%E5%AE%9D%E9%83%BD%E6%98%AF%E7%9C%9F%E7%88%B1%E3%80%82%E7%82%B9%E8%B5%9E%E7%9A%84%E4%B9%9F%E6%98%AF%E7%9C%9F%E7%88%B1.mp4",
      duration: ""
    },
    {
      title: "第十集",
      url: "https://hefollo.com/%E6%8A%96%E9%9F%B3%E5%B0%8F%E5%A7%90%E5%A7%90%E8%A7%86%E9%A2%91/%E4%BD%B3%E4%BD%B3%E9%85%B1HappyFree/6768811888072592652-%E6%98%AF%E8%B0%81%E8%AF%B4%E5%96%9C%E6%AC%A2%E6%88%91%E7%9A%84%E7%AC%91%E6%9D%A5%E7%9D%80%EF%BC%9F.mp4",
      duration: ""
    }
    // 按此格式继续添加更多视频即可
];
// ========================================================

var currentIndex = 0;
var autoPlayNext = true;
var loopAll = false;
var video = document.getElementById('mainVideo');
var playlistEl = document.getElementById('playlist');

function initPlaylist() {
    playlistEl.innerHTML = '';
    for (var i = 0; i < videoList.length; i++) {
      var item = document.createElement('div');
      item.className = 'playlist-item' + (i === 0 ? ' playing' : '');
      item.setAttribute('data-index', i);
      item.innerHTML =
            '<div class="item-index">' + (i + 1) + '</div>' +
            '<div class="item-info">' +
                '<div class="item-title">' + videoList.title + '</div>' +
                '<div class="item-duration">' + (videoList.duration || '') + '</div>' +
            '</div>' +
            '<div class="playing-indicator">' + (i === 0 ? '▶ 播放中' : '') + '</div>';
      item.onclick = (function(idx) {
            return function() { playVideo(idx); };
      })(i);
      playlistEl.appendChild(item);
    }
}

function playVideo(index) {
    if (index < 0) index = loopAll ? videoList.length - 1 : 0;
    if (index >= videoList.length) index = loopAll ? 0 : videoList.length - 1;
    currentIndex = index;
    var item = videoList;
    video.src = item.url;
    video.load();
    video.play().catch(function(e) {});
    document.getElementById('videoTitle').textContent = item.title;
    document.getElementById('videoIndex').textContent = '第 ' + (index + 1) + ' 集 / 共 ' + videoList.length + ' 集';
    var items = playlistEl.querySelectorAll('.playlist-item');
    for (var i = 0; i < items.length; i++) {
      items.className = 'playlist-item';
      var indicator = items.querySelector('.playing-indicator');
      indicator.textContent = '';
      if (i < index) items.className += ' played';
      if (i === index) {
            items.className += ' playing';
            indicator.textContent = '▶ 播放中';
      }
    }
}

function nextVideo() {
    if (currentIndex < videoList.length - 1) playVideo(currentIndex + 1);
    else if (loopAll) playVideo(0);
}

function prevVideo() {
    if (currentIndex > 0) playVideo(currentIndex - 1);
    else if (loopAll) playVideo(videoList.length - 1);
}

function toggleAutoPlay() {
    autoPlayNext = !autoPlayNext;
    var btn = document.getElementById('autoPlayBtn');
    btn.textContent = autoPlayNext ? '🔁 连播: 开' : '🔁 连播: 关';
    btn.className = 'ctrl-btn' + (autoPlayNext ? ' active' : '');
}

function toggleLoop() {
    loopAll = !loopAll;
    var btn = document.getElementById('loopBtn');
    btn.textContent = loopAll ? '🔂 循环: 开' : '🔂 循环: 关';
    btn.className = 'ctrl-btn' + (loopAll ? ' active' : '');
}

video.addEventListener('ended', function() {
    if (autoPlayNext) {
      if (currentIndex < videoList.length - 1) nextVideo();
      else if (loopAll) playVideo(0);
    }
});

initPlaylist();
playVideo(0);
</script>
页: [1]
查看完整版本: 抖音小姐姐佳佳酱的舞蹈秀合集