❀肉视频 S(求修复视频播放)
https://rou1.vip/
分享者: plocy (855)发布时间: 7天前
该用户很懒,什么介绍也没有写!
{
"articleStyle": 3,
"cacheFirst": false,
"customOrder": 0,
"enableJs": true,
"enabled": false,
"enabledCookieJar": false,
"header": "{\n \"User-Agent\": \"Mozilla\/5.0 (Linux; Android 13; SM-G998B) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/112.0.0.0 Mobile Safari\/537.36\",\n \"Accept-Encoding\": \"identity\",\n \"Upgrade-Insecure-Requests\": \"1\"\n}",
"injectJs": "function setupCustomPlayer(video) {\n \/\/ 手势滑动快进\n let isDragging = false;\n let startX = 0;\n let startTime = 0;\n \n \/\/ 长按加速相关变量\n let longPressTimer = null;\n const LONG_PRESS_DELAY = 300;\n const NORMAL_SPEED = 1.25;\n const FAST_SPEED = 3;\n let wasPaused = false;\n\n \/\/ 触摸事件处理\n function handleTouchStart(e) {\n startX = e.touches[0].clientX;\n startTime = video.currentTime;\n wasPaused = video.paused;\n \n longPressTimer = setTimeout(() => {\n video.playbackRate = FAST_SPEED;\n if (wasPaused) video.play();\n }, LONG_PRESS_DELAY);\n }\n\n function handleTouchMove(e) {\n if (longPressTimer) {\n clearTimeout(longPressTimer);\n longPressTimer = null;\n }\n \n const dx = e.touches[0].clientX - startX;\n if (Math.abs(dx) > 10) {\n if (!isDragging) {\n video.pause();\n isDragging = true;\n }\n const change = (dx \/ video.clientWidth) * video.duration;\n video.currentTime = Math.max(0, Math.min(startTime + change, video.duration));\n }\n }\n\n function handleTouchEnd() {\n if (longPressTimer) {\n clearTimeout(longPressTimer);\n longPressTimer = null;\n }\n \n if (isDragging) {\n video.playbackRate = NORMAL_SPEED;\n video.play();\n isDragging = false;\n } else if (video.playbackRate === FAST_SPEED) {\n video.playbackRate = NORMAL_SPEED;\n if (wasPaused) video.pause();\n }\n }\n\n \/\/ 添加触摸事件监听\n video.addEventListener('touchstart', handleTouchStart);\n video.addEventListener('touchmove', handleTouchMove);\n video.addEventListener('touchend', handleTouchEnd);\n \n \/\/ 初始播放速度\n video.playbackRate = NORMAL_SPEED;\n\n \/\/ 创建按钮的通用函数\n function createButton(text, onClick, position, width = '20px') {\n const button = document.createElement('button');\n button.textContent = text;\n button.style.position = 'absolute';\n button.style[position.horizontal] = '0';\n button.style.top = '50%';\n button.style.transform = 'translateY(-50%)';\n button.style.zIndex = '999';\n button.style.padding = '1px';\n button.style.background = 'rgba(51, 51, 51, 0)';\n button.style.color = '#fff';\n button.style.border = 'none';\n button.style.cursor = 'pointer';\n button.style.width = width;\n button.style.height = '30px';\n button.addEventListener('click', onClick);\n video.parentNode.appendChild(button);\n return button;\n }\n\n \/\/ 旋转按钮(右侧)\n createButton('⟳', () => {\n const currentRotation = parseInt(video.getAttribute('data-rotation') || '0');\n const newRotation = (currentRotation + 90) % 360;\n video.setAttribute('data-rotation', newRotation);\n \n \/\/ 保留当前的缩放比例\n const currentTransform = video.style.transform || '';\n let currentScale = 1;\n const scaleMatch = currentTransform.match(\/scale\\(([^)]+)\\)\/);\n if (scaleMatch) currentScale = parseFloat(scaleMatch[1]);\n \n video.style.transform = `rotate(${newRotation}deg) scale(${currentScale})`;\n }, { horizontal: 'right' });\n\n \/\/ 缩放按钮(左侧)\n let zoomCount = 0;\n createButton('+', () => {\n const currentRotation = parseInt(video.getAttribute('data-rotation') || '0');\n \n \/\/ 获取当前缩放比例\n const currentTransform = video.style.transform || '';\n let currentScale = 1;\n const scaleMatch = currentTransform.match(\/scale\\(([^)]+)\\)\/);\n if (scaleMatch) currentScale = parseFloat(scaleMatch[1]);\n \n if (zoomCount < 4) {\n const newScale = currentScale * 1.25;\n video.style.transform = `rotate(${currentRotation}deg) scale(${newScale})`;\n zoomCount++;\n } else {\n video.style.transform = `rotate(${currentRotation}deg) scale(1)`;\n zoomCount = 0;\n }\n }, { horizontal: 'left' });\n\n \/\/ 快速跳转按钮(底部中央)\n const buttonContainer = document.createElement('div');\n buttonContainer.style.position = 'absolute';\n buttonContainer.style.bottom = '0';\n buttonContainer.style.left = '50%';\n buttonContainer.style.transform = 'translateX(-50%)';\n buttonContainer.style.display = 'flex';\n buttonContainer.style.gap = '10px';\n buttonContainer.style.zIndex = '999';\n \n \/\/ 按钮配置\n const seekButtons = [\n { text: '-5分', time: -300 },\n { text: '-1分', time: -60 },\n { text: '+1分', time: 60 },\n { text: '+5分', time: 300 }\n ];\n\n seekButtons.forEach(({ text, time }) => {\n const button = document.createElement('button');\n button.textContent = text;\n button.style.padding = '1px';\n button.style.background = 'rgba(51, 51, 51, 0)';\n button.style.color = '#fff';\n button.style.border = 'none';\n button.style.cursor = 'pointer';\n button.style.width = '60px';\n button.style.height = '30px';\n button.addEventListener('click', () => {\n video.currentTime = Math.max(0, Math.min(video.currentTime + time, video.duration));\n });\n buttonContainer.appendChild(button);\n });\n\n video.parentNode.appendChild(buttonContainer);\n}\n\n\/\/ 修改初始化逻辑,增加重试机制\nfunction initPlayerWithRetry() {\n const maxRetries = 10;\n const retryInterval = 500;\n let retries = 0;\n const tryInit = () => {\n const video = document.getElementById('video');\n if (video) {\n setupCustomPlayer(video);\n } else if (retries < maxRetries) {\n retries++;\n setTimeout(tryInit, retryInterval);\n }\n };\n tryInit();\n}\n\/\/ 使用重试机制初始化播放器\ninitPlayerWithRetry();",
"lastUpdateTime": 0,
"loadWithBaseUrl": true,
"loginUrl": "https:\/\/rou1.cc\/",
"preload": false,
"ruleArticles": ".transform",
"ruleContent": "{{$.video.videoUrl}}\n\n@js:\n\nresult=`\n<html><head><meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no\" \/>\n<meta name=\"referrer\" content=\"never\"\/>\n <style>html, body {text-align: center;margin: 0; padding: 0;width: 100%;overflow: hidden;} <\/style>\n <script src=\"https:\/\/unpkg.com\/hls.js@1.4.3\/dist\/hls.min.js\"><\/script>\n<\/head><body>\n <div class=\"container\">\n <div class=\"title\">{{java.get('title')}}<\/div>\n <video id=\"video\" width=\"100%\" height=\"91%\" poster=\"${java.get('pic')}\" controls autoplay muted loop><\/video>\n <\/div>\n<script>\nconst v=document.getElementById('video'),s=[\n \"${result}\",\n \"${result}\"];\nlet c=0;\nfunction setupCustomControls(e){\/* 自定义功能实现 *\/}\nfunction playNext(){\n c>=s.length&&(c=0); \/\/ 循环重置计数器\n const u=s[c++];\n \n \/\/ 检测Hls对象是否存在\n if (typeof Hls !== 'undefined' && Hls.isSupported()) {\n const h=new Hls();\n h.loadSource(u);\n h.attachMedia(v);\n h.on(Hls.Events.MANIFEST_PARSED,()=>v.play().then(()=>setupCustomControls(v)).catch(console.log));\n h.on(Hls.Events.ERROR,(_,d)=>d.fatal&&playNext())\n } else { \/\/ Hls加载失败或浏览器原生支持HLS\n if (v.canPlayType('application\/vnd.apple.mpegurl')) {\n v.src = u;\n v.onloadedmetadata = () => v.play().then(() => setupCustomControls(v));\n v.onerror = playNext;\n } else {\n \/\/ 如果都不支持,尝试直接播放(可能支持MP4等格式)\n v.src = u;\n v.onerror = playNext;\n v.play().then(() => setupCustomControls(v)).catch(playNext);\n }\n }\n}playNext();\n<\/script>\n<\/body><\/html>\n`",
"ruleImage": "img.0@src\n<js>\njava.put('pic',result)\n<\/js>",
"ruleLink": "\/api\/{{@@a.0@href}}",
"ruleNextPage": "page",
"rulePubDate": "{{@@.space-x-1.0@span@text}} ⏱️{{@@.bottom-1@text}}\n@js:\nresult = result !== \"\" ? result : \"点击播放\";",
"ruleTitle": "img@alt",
"showWebLog": false,
"singleUrl": false,
"sortUrl": "\n随机::\/v?order=createdAt&page={{ Math.ceil(Math.random()*1890) }}\n最新::\/v?order=createdAt&page={{page}}\n\n🔎搜索::\/search?q={{v=source.getVariable();if(\/^\\s*$\/.test(v)||v==null)source.setVariable('奸');source.getVariable()}}&t=&sort=&page={{page}}\n\n国产::\/t\/國產AV?order=createdAt&page={{page}}\n麻豆::\/t\/麻豆傳媒?order=createdAt&page={{page}}\nOnlyFans::\/t\/OnlyFans?order=createdAt&page={{page}}\n自拍::\/t\/自拍流出?order=createdAt&page={{page}}\n探花::\/t\/探花?order=createdAt&page={{page}}\n日本::\/t\/日本?order=createdAt&page={{page}}\n",
"sourceGroup": "© 视频,1",
"sourceIcon": "https:\/\/qyyuapi.com\/img\/肉视频.png",
"sourceName": "❀肉视频 S(求修复视频播放)",
"sourceUrl": "https:\/\/rou1.vip\/",
"style": ".container {\n position: relative; \/* 相对定位,用于包含视频 *\/\n height: 100%; \/* 容器高度与视频原始高度相同 *\/\n overflow: hidden; \/* 隐藏超出容器的部分 *\/\n}\n.title {\n position: absolute; \/* 绝对定位,相对于容器 *\/\n top: 0; \n width: 100%;\n overflow: hidden; \n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical; \n -webkit-line-clamp: 2;\n z-index: 1; \/* 确保标题在视频之上 *\/\n background: #000; \/* 纯黑色背景 *\/ \n padding: 0 0 3px 0;\n}\nvideo {\n position: absolute; \/* 绝对定位,相对于容器 *\/ \n top: +20px; \/* 视频上移 *\/\n left: 0; \n width: 100%; \n height: calc(93% + 0px); \/* 调整高度以适应内容 *\/\n object-fit: contain; \/* 确保视频内容不被裁剪 *\/\n z-index: 0; \/* 确保视频在标题之下 *\/\n controls=\"controls\" autoplay muted; \n} \nvideo::-webkit-media-controls-overlay-play-button {\n display: none !important;\n}\nvideo::-webkit-media-controls-fullscreen-button {\n display: none !important;\n}",
"type": 0
}