// ==UserScript== // @name 【v2.3.8】采集接口VIP视频通行证 // @namespace http://tampermonkey.net/ // @version 2.3.9 // @description 视频VIP 影视vip 电影vip解析-----【性能增强版】引入“智能缓冲策略”深度优化播放核心!保留极致交互体验:加载动画、可视化倒计时,操作清晰可预测。纯净内嵌,稳定兼容,内置跳过片头与剧集连播,聚合海量片源,为您打造终极观影享受。 // @author You & Refined // @include *://v.qq.com/x/page/* // @include *://v.qq.com/x/cover/* // @include *://v.qq.com/tv/* // @include *://*.iqiyi.com/v_* // @include *://*.iqiyi.com/a_* // @include *://*.iqiyi.com/w_* // @include *://*.iq.com/play/* // @include *://v.youku.com/v_* // @include *://*.youku.com/v_* // @include *://*.mgtv.com/b/* // @include *://tv.sohu.com/v/* // @include *://film.sohu.com/album/* // @include *://*.bilibili.com/video/* // @include *://*.bilibili.com/bangumi/play/* // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_setValue // @grant GM_getValue // @run-at document-end // // @connect collect.wolongzy.cc // @connect cj.lziapi.com // @connect api.zuidapi.com // @connect subocaiji.com // @connect ikunzy.com // @connect api.guangsuapi.com // @connect www.huyaapi.com // @connect api.apibdzy.com // @connect api.ukuapi.com // @connect cj.ffzyapi.com // @connect bfzyapi.com // @connect api.wujinapi.me // @connect www.hongniuzy2.com // ==/UserScript== (function() { 'use strict'; // --- 1. CONFIGURATION & CONSTANTS --- const CONFIG = { API_TIMEOUT: 5000, ENGINE_FALLBACK_TIMEOUT: 15000, AUTOPLAY_NEXT_DELAY: 1500, PANEL_LEAVE_CLOSE_DELAY: 1500, AUTOPLAY_MATCH_DELAY: 3000, REPAINT_ATTACK_DELAY_1: 1000, REPAINT_ATTACK_DELAY_2: 2500, MSG_TYPE_VIDEO_ENDED: 'tm_video_ended', STORAGE_KEY_ICON_POSITION: 'tm_icon_position', }; // 【性能优化核心】HLS.js 播放器核心配置 // 我们在这里定义了更激进的缓冲策略 const HLS_CONFIG = { // --- 核心缓冲设置 --- // 最大缓冲时长(秒)。从默认的30秒增加到180秒(3分钟)。 // 这意味着播放器会尽可能预加载未来3分钟的视频内容。 maxBufferLength: 180, // 内存中保留的最大缓冲长度(秒)。当缓冲区超过这个值时, // HLS.js会开始清理旧的片段。我们设为300秒(5分钟)。 maxMaxBufferLength: 300, // --- 启动与加载优化 --- // 首次加载媒体播放列表后要缓冲的最小段数。 // 适当增加可以确保启动时更流畅。 startFragPrefetch: true, // --- 稳定性设置 --- // 在遇到网络错误时,允许重试的次数。 fragLoadingMaxRetry: 4, // 每次重试的延迟(毫秒)。 fragLoadingRetryDelay: 1000, }; const _0x1a5020=_0x8d23;function _0x5b34(){const _0x170c31=['3201ooHzWs','暴风采集','百度采集','45490JiGpzc','32408hINDNk','https://subocaiji.com/api.php/provide/vod/','https://www.huyaapi.com/api.php/provide/vod/','9YlkSpP','29255bAfNQI','https://bfzyapi.com/api.php/provide/vod/','最大采集','虎牙采集','263594trNiXg','32MuwPch','https://api.zuidapi.com/api.php/provide/vod/','爱坤采集','https://ikunzy.com/api.php/provide/vod/','光速采集','量子采集','https://api.wujinapi.me/api.php/provide/vod/','924714qZyjTX','4066398fqpnQr','https://cj.lziapi.com/api.php/provide/vod/','卧龙采集','https://www.hongniuzy2.com/api.php/provide/vod/','80977NUSYyJ','497DROgvl'];_0x5b34=function(){return _0x170c31;};return _0x5b34();}function _0x8d23(_0x44ee8b,_0x4e2101){const _0x5b34ca=_0x5b34();return _0x8d23=function(_0x8d2357,_0x18ac5d){_0x8d2357=_0x8d2357-0xa0;let _0x480ed1=_0x5b34ca[_0x8d2357];return _0x480ed1;},_0x8d23(_0x44ee8b,_0x4e2101);}(function(_0x1add32,_0x5974ad){const _0x1c22d6=_0x8d23,_0x5a2a9a=_0x1add32();while(!![]){try{const _0x3af750=-parseInt(_0x1c22d6(0xb8))/0x1+parseInt(_0x1c22d6(0xab))/0x2*(-parseInt(_0x1c22d6(0xa6))/0x3)+-parseInt(_0x1c22d6(0xac))/0x4*(-parseInt(_0x1c22d6(0xa7))/0x5)+parseInt(_0x1c22d6(0xb3))/0x6+parseInt(_0x1c22d6(0xb9))/0x7*(-parseInt(_0x1c22d6(0xa3))/0x8)+-parseInt(_0x1c22d6(0xb4))/0x9+parseInt(_0x1c22d6(0xa2))/0xa*(parseInt(_0x1c22d6(0xba))/0xb);if(_0x3af750===_0x5974ad)break;else _0x5a2a9a['push'](_0x5a2a9a['shift']());}catch(_0x45083f){_0x5a2a9a['push'](_0x5a2a9a['shift']());}}}(_0x5b34,0x4b68b));const APIS=[{'name':_0x1a5020(0xb6),'url':'https://collect.wolongzy.cc/api.php/provide/vod/'},{'name':_0x1a5020(0xb1),'url':_0x1a5020(0xb5)},{'name':_0x1a5020(0xa9),'url':_0x1a5020(0xad)},{'name':'速播采集','url':_0x1a5020(0xa4)},{'name':_0x1a5020(0xae),'url':_0x1a5020(0xaf)},{'name':_0x1a5020(0xb0),'url':'https://api.guangsuapi.com/api.php/provide/vod/'},{'name':_0x1a5020(0xaa),'url':_0x1a5020(0xa5)},{'name':_0x1a5020(0xa1),'url':'https://api.apibdzy.com/api.php/provide/vod/'},{'name':'U酷采集','url':'https://api.ukuapi.com/api.php/provide/vod/'},{'name':'非凡采集','url':'https://cj.ffzyapi.com/api.php/provide/vod/'},{'name':_0x1a5020(0xa0),'url':_0x1a5020(0xa8)},{'name':'无尽采集','url':_0x1a5020(0xb2)},{'name':'红牛采集','url':_0x1a5020(0xb7)}]; const PLAYBACK_ENGINES = [ { name: "DPlayer (首选)", type: "internal_dplayer" }, { name: "原生播放器 (备用)", type: "internal_native" }, ]; // --- 2. SCRIPT STATE --- (无变动) let currentEpisodeList = []; let currentPlayingUrl = ''; let currentEngineAttemptIndex = 0; let fallbackTimeout = null; let hiddenPlayerElement = null; let resizeTimeout; let lastSelectedSourceApi = null; let currentBlobUrl = null; let panelCollapseTimeout = null; let autoplayTimeout = null; let countdownInterval = null; // --- 3. UI ELEMENTS & STYLES --- (无变动) GM_addStyle(` #tm-container-fusion { position: fixed; z-index: 999999; width: 38px; height: 38px; text-align: center; cursor: grab; transition: all 0.3s ease; } #tm-main-btn-fusion { width: 100%; height: 100%; border: none; border-radius: 50%; background: linear-gradient(135deg, #FFD700, #FFA500); color: white; cursor: pointer; box-shadow: 0 4px 8px rgba(0,0,0,0.2); transition: all 0.3s ease; padding: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; } #tm-main-btn-fusion:hover { transform: scale(1.1); box-shadow: 0 6px 12px rgba(0,0,0,0.3); } #tm-main-btn-fusion::before { content: "VIP"; font-size: 16px; font-weight: bold; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); transition: all 0.2s; } @keyframes tm-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } #tm-main-btn-fusion.loading::before { content: ''; box-sizing: border-box; width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: tm-spin 0.8s linear infinite; } #tm-panel-fusion { display: none; position: absolute; left: 48px; top: 0; min-width: 120px; background: rgba(255, 255, 255, 0.95); border-radius: 8px; padding: 5px; max-height: 70vh; box-shadow: 0 6px 20px rgba(0,0,0,0.15); font-size: 12px; backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.2); display: flex; flex-direction: column; } #tm-status-bar { padding: 4px; margin-bottom: 5px; background: #f1f3f5; border-radius: 6px; text-align: center; font-weight: 500; color: #495057; font-size: 11px; min-height: 16px; transition: background-color 0.3s, color 0.3s; } .tm-collection-btn { display: block; width: 100%; padding: 4px 6px; background: #fff; border: 1px solid #e9ecef; border-radius: 6px; cursor: pointer; text-align: center; font-weight: 500; color: #495057; font-size: 11px; transition: all 0.2s ease; white-space: nowrap; box-sizing: border-box; } .tm-collection-btn:hover { background: #f8f9fa; transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.05); } .tm-episode-matched, .tm-source-selected { background: linear-gradient(135deg, #28a745, #20c997) !important; color: white !important; border-color: transparent !important; box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3) !important; } #tm-content-area { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; flex-grow: 1; overflow-y: auto; padding-right: 4px; } #tm-content-area.source-list { grid-template-columns: 1fr; } #tm-content-area::-webkit-scrollbar { width: 4px; } #tm-content-area::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 2px; } #tm-content-area::-webkit-scrollbar-thumb { background: #888; border-radius: 2px; } #tm-content-area::-webkit-scrollbar-thumb:hover { background: #555; } #tm-player-overlay-fusion { position: absolute; background-color: #000; z-index: 999998; display: none; transition: opacity 0.3s; } #tm-iframe-player-fusion { width: 100%; height: 100%; border: none; background-color: #000; } #tm-close-btn-fusion { position: fixed; top: 15px; right: 15px; z-index: 1000001; width: 36px; height: 36px; border-radius: 50%; background: rgba(220, 53, 69, 0.9); color: white; border: none; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; } #tm-close-btn-fusion:hover { background: #dc3545; transform: scale(1.1); } #tm-player-status { position: fixed; top: 5%; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.7); color: white; padding: 8px 16px; border-radius: 20px; font-size: 14px; z-index: 1000000; pointer-events: none; backdrop-filter: blur(4px); } `); const container = document.createElement('div'); container.id = 'tm-container-fusion'; const mainBtn = document.createElement('button'); mainBtn.id = 'tm-main-btn-fusion'; const panel = document.createElement('div'); panel.id = 'tm-panel-fusion'; const playerOverlay = document.createElement('div'); playerOverlay.id = 'tm-player-overlay-fusion'; playerOverlay.innerHTML = `
`; document.body.appendChild(container); document.body.appendChild(playerOverlay); container.append(mainBtn, panel); const iframePlayer = document.getElementById('tm-iframe-player-fusion'); const closeBtn = document.getElementById('tm-close-btn-fusion'); const playerStatus = document.getElementById('tm-player-status'); // --- 4. CORE LOGIC (Player & Search) --- const playerExtraStyles = ` #skip-controls { position: fixed; bottom: 60px; right: 10px; z-index: 999; display: flex; flex-direction: column; gap: 5px; } .skip-btn { background: rgba(0,0,0,0.5); color: white; border: 1px solid rgba(255,255,255,0.7); border-radius: 5px; padding: 5px 10px; cursor: pointer; font-size: 12px; } .skip-btn:hover { background: rgba(0,0,0,0.8); } `; const playerExtraHTML = `
`; // 【修改点】将 HLS_CONFIG 注入到播放器模板中 function createNativePlayerHtml(m3u8Url) { const safeM3u8Url = m3u8Url.replace(/'/g, "\\'"); const hlsConfigJson = JSON.stringify(HLS_CONFIG); return ` 原生播放器核心 ${playerExtraHTML}