IPTV-Web-Player / index.html
dlxj
已经实现本地 m3u8 ts 播放了
5f865aa
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>IPTV WEB Player</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Include HLS.js via CDN -->
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<!-- Include mux.js for client-side transmuxing -->
<script src="./node_modules/mux.js/dist/mux.min.js"></script>
<!-- Custom CSS -->
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<!-- Replace "logo.png" with your logo file name -->
<img src="logo.png" alt="IPTV Logo">
<h1>IPTV WEB Player</h1>
</header>
<div class="file-input">
<p>Upload the .m3u or .m3u8 file of your Online IPTV channels:</p>
<input type="file" id="m3uFile" accept=".m3u, .m3u8">
<p>Or select a local .ts file to play directly:</p>
<input type="file" id="tsFile" accept=".ts">
<p>Or select a local .m3u8 file and its folder to play entire stream:</p>
<input type="file" id="localM3u8File" webkitdirectory directory>
<p>(You can interact with the player using mouse, touch, keyboard, gamepad, or remote control).</p>
</div>
<div class="main-container">
<!-- Player area -->
<div class="player-container">
<div class="spinner-overlay" id="spinner">
<div class="spinner"></div>
</div>
<video id="videoPlayer" controls></video>
</div>
<!-- Channel list -->
<aside class="channel-list" id="channelList">
<div id="channelsContainer">
<!-- Channels will be generated dynamically here -->
</div>
</aside>
</div>
<footer>
© 2025 IPTV WEB Player | By Bocaletto Luca | GPLv3 | All Rights Reserved.
</footer>
<script src="core.js"></script>
</body>
</html>