video-compressor/public/index.html
2025-01-28 20:03:05 +01:00

51 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Video Compressor</title>
<script defer src="/assets/scripts/ffmpeg/package/dist/umd/ffmpeg.js"></script>
<script defer src="/assets/scripts/ui.js"></script>
<script defer src="/assets/scripts/main.js"></script>
<link rel="stylesheet" href="/assets/style/main.css">
</head>
<body>
<h1>Video Compressor</h1>
<p>Compress video files to a specific file size, so you can upload them to your favorite social media and messaging apps!</p>
<section id="file-picker-section">
<div id="file-drop-area" onclick="openFileSelector()" onkeydown="['Enter', 'Space'].includes(event.code) && openFileSelector()" tabindex="0">
<span>Drag and drop a file here!</span>
</div>
<input id="file-input" oninput="selectFile()" type="file" accept="video/*" tabindex="-1">
<div id="file-input-spacing" style="margin-top: -1rem">
<button class="simple">.</button>
</div>
<video id="uploaded-video" controls autoplay></video>
<button id="change-file" onclick="openFileSelector()" class="simple">Change video</button>
<input id="filesize" type="number" value="10" size="3" placeholder="#"><!--
--><select id="filesize-unit">
<option value="K">KB</option>
<option value="M" selected>MB</option>
<option value="G">GB</option>
</select>
<button id="compress" onclick="compress()" class="primary">Go!</button>
</section>
<section id="loading-section" style="opacity: 0; display: none;">
<h3 id="loading-title">Please wait...</h3>
<p id="loading-description">This may take a while</p>
<div id="progress-container">
<div id="progress-indicator"></div>
</div>
<p id="progress-percentage">0%</p>
</section>
</body>
</html>