[discuz插件]云码酷discuz!多格式记忆网络播放器

云码酷  于 2024-12-9 10:55:35 |只看大图 回帖奖励 |阅读模式
15 9195
Discuz插件
名 称: 云码酷discuz!多格式记忆网络播放器
价 值:
兼容版本: X2.5 X3 X3.1 X3.2 X3.3 X3.4 F1.0 L1.0 
适配编码: GBK BIG5 UTF8SC UTF8TC 
分  类:   视听娱乐
应用中心地址: -
应用介绍: 云码酷discuz!网络播放器,使用discuz!代码功能实现贴内视频播放功能,播放器支持M3U8、MP4、FLV等主流视频格式,选项卡信息展示中可根据剧集数量或线路数量进行设置。

马上注册,自学更多教程,下载更多资源。

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
云码酷 discuz!网络播放器,基于先进的 discuz!代码功能精心打造,旨在为用户带来便捷、流畅的贴内视频播放体验。该播放器具备强大的兼容性,全面支持 M3U8、MP4、FLV 等当下主流的视频格式,无论是精彩的剧集还是各类视频资源,都能完美呈现。在选项卡信息展示方面,其设计独具匠心,可根据剧集数量或线路数量进行灵活设置,让用户能够清晰、直观地选择所需内容,轻松畅游于丰富多样的视频世界之中。


帖中界面展示:

云码酷 云码酷discuz!多格式记忆网络播放器 格式,网络,discuz,云码酷 Discuz 103943jrpo6p8zp764d4ib

云码酷 云码酷discuz!多格式记忆网络播放器 格式,网络,discuz,云码酷 Discuz 103943uorfplt57uc6yttt

使用设置:
云码酷 云码酷discuz!多格式记忆网络播放器 格式,网络,discuz,云码酷 Discuz 105335oixz8amuimiiihju
标签:m3u8(可自定义命名)

替换内容:
[HTML] 纯文本查看 复制代码
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> .player-container { max-width: 1200px; margin: 0 auto; background-color: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); padding: 20px; } .tabs { margin-bottom: 15px; } .tab-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; border-bottom: 2px solid #dee2e6; padding-bottom: 10px; } .tab-button { padding: 10px 20px; background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; font-weight: 500; } .tab-button:hover { background: #e9ecef; border-color: #ced4da; } .tab-button.active { background: #0d6efd; color: white; border-color: #0a58ca; } .episodes-container { margin-top: 20px; padding: 15px; background: #f8f9fa; border-radius: 8px; } .episodes-title { font-size: 1.1em; color: #495057; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 1px solid #dee2e6; } .episode-buttons { display: flex; flex-wrap: wrap; gap: 10px; } .episode-button { padding: 8px 16px; background: white; border: 1px solid #dee2e6; border-radius: 6px; cursor: pointer; transition: all 0.2s ease; font-weight: 500; } .episode-button:hover { background: #0d6efd; color: white; border-color: #0a58ca; transform: translateY(-1px); } .loading { display: none; text-align: center; padding: 20px; font-size: 16px; color: #6c757d; } .loading::after { content: '...'; animation: dots 1.5s steps(4, end) infinite; } .error-message { display: none; text-align: center; padding: 15px; color: #842029; background-color: #f8d7da; border: 1px solid #f5c2c7; border-radius: 6px; margin-bottom: 15px; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes dots { 0%, 20% { content: '.'; } 40% { content: '..'; } 60% { content: '...'; } 80%, 100% { content: ''; } } @media (max-width: 768px) { body { padding: 10px; } .player-container { padding: 15px; } .tab-button { padding: 8px 16px; font-size: 14px; } .episode-button { padding: 6px 12px; font-size: 14px; } } </style> <div class="player-container"> <div id="errorMessage" class="error-message"></div> <div id="loading" class="loading">Loading</div> <iframe id="videoPlayer" style="width: 100%; height: 450px; border: none; margin-bottom: 15px; border-radius: 8px; background-color: #000;" allowfullscreen></iframe> <div class="tabs"> <div id="tabButtons" class="tab-buttons"></div> <div id="episodesContainer" class="episodes-container"> <div id="episodeButtons" class="episode-buttons"></div> </div> </div> </div> <script> const CONFIG = { PLAYER_BASE_URL: 'https://www.ym.cool/tv/ck/dzPlayer1.php?txt=', ERROR_DISPLAY_DURATION: 3000, VIDEO_DATA: `{1}` }; const UIManager = { elements: { player: null, loading: null, error: null, tabButtons: null, episodeButtons: null }, init() { this.elements = { player: document.getElementById('videoPlayer'), loading: document.getElementById('loading'), error: document.getElementById('errorMessage'), tabButtons: document.getElementById('tabButtons'), episodeButtons: document.getElementById('episodeButtons') }; Object.values(this.elements).forEach(element => { if (!element) throw new Error('Required DOM elements not found'); }); }, showLoading(show) { this.elements.loading.style.display = show ? 'block' : 'none'; }, showError(message) { this.elements.error.textContent = message; this.elements.error.style.display = 'block'; setTimeout(() => { this.elements.error.style.display = 'none'; }, CONFIG.ERROR_DISPLAY_DURATION); } }; const VideoPlayer = { play(url, episodeNumber) { if (!url) throw new Error('Invalid video URL'); const formattedUrl = `第 ${episodeNumber} 集, ${url}`; UIManager.elements.player.src = CONFIG.PLAYER_BASE_URL + encodeURIComponent(formattedUrl); } }; const DataParser = { parse(data) { if (!data?.trim()) throw new Error('Invalid video data'); return data.split('<br />').filter(line => line.trim()).map(line => { const [name, ...urls] = line.split(','); return { name: name?.trim(), urls: urls.filter(url => url?.trim()) }; }); } }; const TabManager = { currentSeries: null, createTabs(videoData) { videoData.forEach((series, index) => { const button = document.createElement('button'); button.className = `tab-button${index === 0 ? ' active' : ''}`; button.textContent = series.name; button.onclick = () => this.switchTab(series, index); UIManager.elements.tabButtons.appendChild(button); }); if (videoData[0]) { this.showEpisodes(videoData[0]); } }, switchTab(series, index) { document.querySelectorAll('.tab-button').forEach((btn, i) => { btn.className = `tab-button${i === index ? ' active' : ''}`; }); this.showEpisodes(series); }, showEpisodes(series) { this.currentSeries = series; UIManager.elements.episodeButtons.innerHTML = ''; series.urls.forEach((url, index) => { const button = document.createElement('button'); button.className = 'episode-button'; button.textContent = `第 ${index + 1} 集`; button.onclick = () => this.playEpisode(url, index + 1); UIManager.elements.episodeButtons.appendChild(button); }); }, playEpisode(url, episodeNumber) { try { UIManager.showLoading(true); VideoPlayer.play(url, episodeNumber); } catch (error) { UIManager.showError(error.message); } finally { UIManager.showLoading(false); } } }; function initializePlayer() { try { UIManager.init(); const videoData = DataParser.parse(CONFIG.VIDEO_DATA); if (!videoData.length) { throw new Error('No video data available'); } TabManager.createTabs(videoData); if (videoData[0]?.urls[0]) { VideoPlayer.play(videoData[0].urls[0], 1); } } catch (error) { UIManager.showError(error.message); } } initializePlayer(); </script>


例子:[m3u8]123[m3u8]

解释:在线播放m3u8/MP4网络视频

参数个数:1

参数提示语:参数样式:剧集名称或线路名称,视频地址。每集一行,视频地址最好以视频格式为结尾

嵌套次数:1

允许使用此代码的用户组:(设置哪些用户组可以使用此代码,根据需求设置)







上一篇:Discuz! X3.2 到 X3.5 各版本的详细升级介绍

云码酷 - 论坛版权1、本主题所有言论和图片纯属会员个人意见,与本论坛立场无关
2、本站所有主题由该帖子作者发表,该帖子作者与云码酷享有帖子相关版权
3、其他单位或个人使用、转载或引用本文时必须同时征得该帖子作者和云码酷的同意
4、帖子作者须承担一切因本文发表而直接或间接导致的民事或刑事法律责任
5、本帖部分内容转载自其它媒体,但并不代表本站赞同其观点和对其真实性负责
6、如本帖侵犯到任何版权问题,请立即告知本站,本站将及时予与删除并致以最深的歉意
7、云码酷管理员和版主有权不事先通知发贴者而删除本文

| 0 人收藏
回复

使用道具 举报

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

    本版积分规则

    1

    主题

    184

    帖子

    185

    积分

    注册会员

    Rank: 2

    积分
    185
    发表于 2024-12-9 11:01:57 来自手机 | 只看该作者
    沙发
    回复 支持 反对

    使用道具 举报

    1

    主题

    202

    帖子

    203

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    203
    发表于 2024-12-9 11:13:18 来自手机 | 只看该作者
    板凳
    路过
    回复 支持 反对

    使用道具 举报

    1

    主题

    173

    帖子

    174

    积分

    注册会员

    Rank: 2

    积分
    174
    发表于 2024-12-9 11:23:53 来自手机 | 只看该作者
    地板
    楼下的接上
    回复 支持 反对

    使用道具 举报

    1

    主题

    180

    帖子

    181

    积分

    注册会员

    Rank: 2

    积分
    181
    发表于 2024-12-9 11:34:24 | 只看该作者
    5#
    为了三千积分!
    回复 支持 反对

    使用道具 举报

    0

    主题

    206

    帖子

    206

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    206
    发表于 2024-12-9 11:45:17 来自手机 | 只看该作者
    6#
    回复 支持 反对

    使用道具 举报

    0

    主题

    204

    帖子

    204

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    204
    发表于 2024-12-9 13:07:48 来自手机 | 只看该作者
    7#
    楼主呀,,,您太有才了。。。
    回复 支持 反对

    使用道具 举报

    0

    主题

    173

    帖子

    173

    积分

    注册会员

    Rank: 2

    积分
    173
    发表于 2024-12-9 13:29:18 | 只看该作者
    8#
    鼎力支持!!
    回复 支持 反对

    使用道具 举报

    0

    主题

    226

    帖子

    226

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    226
    发表于 2024-12-9 13:39:30 来自手机 | 只看该作者
    9#
    顶起出售广告位
    回复 支持 反对

    使用道具 举报

    2

    主题

    209

    帖子

    211

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    211
    发表于 2024-12-9 14:24:09 | 只看该作者
    10#
    鄙视楼下的顶帖没我快,哈哈
    回复 支持 反对

    使用道具 举报

    12下一页
    • 售后服务
    • 关注我们
    • 社区新手

    申请友链|Archiver|手机版|小黑屋|云码酷 ( 京ICP备13037810号 )

    Powered by Discuz! X3.2  © 2001-2022 云码酷