157 lines
7.8 KiB
HTML
157 lines
7.8 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?v=2">
|
|
</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 id="top-banner-title" class="banner-title"></div>
|
|
<div class="user-controls">
|
|
<label>页面主题:
|
|
<select id="theme-selector">
|
|
<option value="light">白天模式</option>
|
|
<option value="dark">深夜模式</option>
|
|
</select>
|
|
</label>
|
|
<div class="user-info">
|
|
<span id="current-username"></span>
|
|
<button id="logout-btn" class="action-btn">退出登录</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<main class="dashboard">
|
|
<section class="video-list-section glass-panel">
|
|
<div class="section-header">
|
|
<h2>Available Videos</h2>
|
|
</div>
|
|
<div class="section-actions-row">
|
|
<div class="section-actions">
|
|
<button id="refresh-btn" class="action-btn" title="刷新列表">刷新列表</button>
|
|
<button id="clear-download-cache-btn" class="action-btn" title="清空下载缓存">清空下载缓存</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="encoder-select">编码加速:</label>
|
|
<select id="encoder-select"></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 id="player-wrapper" 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">
|
|
<!-- Download Phase -->
|
|
<div id="download-phase" class="phase-container">
|
|
<div class="phase-icon download-icon">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24"
|
|
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
stroke-linejoin="round">
|
|
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />
|
|
<polyline points="7 10 12 15 17 10" />
|
|
<line x1="12" y1="15" x2="12" y2="3" />
|
|
</svg>
|
|
</div>
|
|
<h3>正在从 S3 下载源文件...</h3>
|
|
<p id="download-size-text" class="phase-detail">准备下载...</p>
|
|
<div class="progress-info">
|
|
<div id="download-progress-text" class="progress-text">0%</div>
|
|
<div class="progress-bar">
|
|
<div id="download-progress-fill" class="progress-fill"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Transcode Phase -->
|
|
<div id="transcode-phase" class="phase-container hidden">
|
|
<div class="phase-icon transcode-icon">
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 24 24"
|
|
fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
|
stroke-linejoin="round">
|
|
<polygon points="23 7 16 12 23 17 23 7" />
|
|
<rect x="1" y="5" width="15" height="14" rx="2" ry="2" />
|
|
</svg>
|
|
</div>
|
|
<h3>正在转码并流式传输...</h3>
|
|
<p id="transcode-detail-text" class="phase-detail">FFmpeg 转码中...</p>
|
|
<div class="progress-info">
|
|
<div id="transcode-progress-text" class="progress-text">0%</div>
|
|
<div class="progress-bar">
|
|
<div id="transcode-progress-fill" class="progress-fill transcode-fill"></div>
|
|
</div>
|
|
<div id="transcode-stats" class="transcode-stats hidden">
|
|
<span id="stat-fps"></span>
|
|
<span id="stat-bitrate"></span>
|
|
<span id="stat-time"></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<video id="video-player" preload="auto" controls playsinline webkit-playsinline
|
|
class="hidden"></video>
|
|
<div id="seeking-overlay" class="seeking-overlay hidden">
|
|
<div class="spinner"></div>
|
|
<span>跳转中...</span>
|
|
</div>
|
|
</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="stop-transcode-btn" class="play-btn stop-btn hidden">Stop Transcode</button>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
|
|
<script src="/js/main.js?v=2"></script>
|
|
</body>
|
|
|
|
</html> |