Files
Media-Coding-Web/public/index.html

115 lines
5.6 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">
</head>
<body>
<div class="background-effects">
<div class="glow-orb orb-1"></div>
<div class="glow-orb orb-2"></div>
</div>
<div id="login-screen" class="login-screen">
<div class="login-card">
<h2>Login</h2>
<p>Please enter your S3 credentials to continue.</p>
<label>
<span>Access Key</span>
<input id="login-username" type="text" autocomplete="username" placeholder="Access key" />
</label>
<label>
<span>Secret Key</span>
<input id="login-password" type="password" autocomplete="current-password" placeholder="Secret key" />
</label>
<button id="login-btn" class="primary-btn">Login</button>
<p id="login-error" class="form-error hidden"></p>
</div>
</div>
<div class="container hidden" id="app-container">
<div id="top-banner" class="top-banner hidden"></div>
<main class="dashboard">
<section class="video-list-section glass-panel">
<div class="section-header">
<h2>Available Videos</h2>
<div class="section-actions">
<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>
<button id="reset-cache-btn" class="icon-btn" title="Reset Download Cache" aria-label="Reset Download Cache">
<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 4v6h6"/><path d="M21 20v-6h-6"/><path d="M21 10a9 9 0 0 0-15.2-6.8L3 8"/><path d="M3 14a9 9 0 0 0 15.2 6.8L21 16"/></svg>
</button>
</div>
</div>
<div class="bucket-panel">
<label for="bucket-select">Select Bucket</label>
<select id="bucket-select">
<option value="" disabled selected>Choose a bucket</option>
</select>
</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="neon">NEON</option>
<option value="nvidia">NVIDIA</option>
<option value="intel">Intel</option>
<option value="vaapi">VAAPI</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 MP4 file, please wait.</p>
<div id="progress-info" class="progress-info hidden">
<div id="progress-text" class="progress-text">Initializing...</div>
<div class="progress-bar">
<div id="progress-fill" class="progress-fill"></div>
</div>
</div>
</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="transcode-btn" class="play-btn hidden">Start Transcode</button>
<button id="play-btn" class="play-btn hidden">Play</button>
</div>
</section>
</main>
</div>
<script src="/js/main.js"></script>
</body>
</html>