Files
Media-Coding-Web/public/index.html
2026-04-02 17:40:06 +08:00

83 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>S3 Video Streaming Boilerplate</title>
<!-- Use Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/css/style.css">
<!-- hls.js for HLS streaming support -->
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
</head>
<body>
<div class="background-effects">
<div class="glow-orb orb-1"></div>
<div class="glow-orb orb-2"></div>
</div>
<div class="container">
<header>
<h1>S3 Media <span>Transcoder</span></h1>
<p>Seamlessly stream videos from AWS S3 dynamically via FFmpeg HLS Transcoding</p>
</header>
<main class="dashboard">
<section class="video-list-section glass-panel">
<div class="section-header">
<h2>Available Videos</h2>
<button id="refresh-btn" class="icon-btn" title="Refresh List">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>
</button>
</div>
<div class="codec-panel">
<label for="codec-select">编码方式:</label>
<select id="codec-select">
<option value="h264">H264</option>
<option value="h265">H265</option>
</select>
</div>
<div class="codec-panel">
<label for="encoder-select">硬件编码器:</label>
<select id="encoder-select">
<option value="software">Software</option>
<option value="nvidia">NVIDIA</option>
<option value="intel">Intel</option>
</select>
</div>
<div id="loading-spinner" class="spinner-container">
<div class="spinner"></div>
<p>Fetching S3 Objects...</p>
</div>
<ul id="video-list" class="video-list hidden">
<!-- Video items injected by JS -->
</ul>
</section>
<section class="player-section glass-panel">
<div class="player-wrapper">
<div id="player-overlay" class="player-overlay">
<h3>Select a video to start transcoding</h3>
</div>
<div id="transcoding-overlay" class="player-overlay hidden">
<div class="spinner"></div>
<h3>Transcoding via FFmpeg...</h3>
<p>Generating HLS segments, please wait.</p>
</div>
<video id="video-player" controls preload="auto" class="hidden"></video>
</div>
<div id="now-playing" class="now-playing hidden">
<h3>Now Playing</h3>
<p id="current-video-title">video.mp4</p>
<button id="play-btn" class="play-btn hidden">Play</button>
</div>
</section>
</main>
</div>
<script src="/js/main.js"></script>
</body>
</html>