guanwei1225 commited on
Commit
35e10b9
·
verified ·
1 Parent(s): efe2bb6

undefined - Initial Deployment

Browse files
Files changed (2) hide show
  1. README.md +7 -5
  2. index.html +467 -19
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Ai
3
- emoji: 👀
4
- colorFrom: pink
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: ai
3
+ emoji: 🐳
4
+ colorFrom: green
5
+ colorTo: gray
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,467 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>VideoBG Remover - 专业视频背景去除工具</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #6B73FF 0%, #000DFF 50%, #0085FF 100%);
12
+ }
13
+ .upload-area {
14
+ border: 2px dashed rgba(255, 255, 255, 0.3);
15
+ transition: all 0.3s ease;
16
+ }
17
+ .upload-area:hover {
18
+ border-color: rgba(255, 255, 255, 0.6);
19
+ background-color: rgba(255, 255, 255, 0.05);
20
+ }
21
+ .upload-area.dragover {
22
+ border-color: #4ADE80;
23
+ background-color: rgba(74, 222, 128, 0.1);
24
+ }
25
+ .progress-bar {
26
+ height: 8px;
27
+ transition: width 0.3s ease;
28
+ }
29
+ .tooltip:hover .tooltip-text {
30
+ opacity: 1;
31
+ visibility: visible;
32
+ }
33
+ .video-preview {
34
+ aspect-ratio: 16/9;
35
+ }
36
+ </style>
37
+ </head>
38
+ <body class="bg-gray-900 text-white min-h-screen">
39
+ <!-- 导航栏 -->
40
+ <nav class="bg-gray-800 py-4 px-6 shadow-lg">
41
+ <div class="max-w-7xl mx-auto flex justify-between items-center">
42
+ <div class="flex items-center space-x-2">
43
+ <i class="fas fa-video text-blue-400 text-2xl"></i>
44
+ <h1 class="text-xl font-bold">VideoBG Remover</h1>
45
+ </div>
46
+ <div class="hidden md:flex space-x-6">
47
+ <a href="#" class="hover:text-blue-400 transition">首页</a>
48
+ <a href="#" class="hover:text-blue-400 transition">教程</a>
49
+ <a href="#" class="hover:text-blue-400 transition">定价</a>
50
+ <a href="#" class="hover:text-blue-400 transition">关于</a>
51
+ </div>
52
+ <div class="flex items-center space-x-4">
53
+ <button class="px-4 py-2 rounded-lg bg-blue-600 hover:bg-blue-700 transition">登录</button>
54
+ <button class="px-4 py-2 rounded-lg border border-blue-400 text-blue-400 hover:bg-blue-900 transition">注册</button>
55
+ </div>
56
+ <button class="md:hidden text-xl">
57
+ <i class="fas fa-bars"></i>
58
+ </button>
59
+ </div>
60
+ </nav>
61
+
62
+ <!-- 主要内容 -->
63
+ <main class="max-w-7xl mx-auto px-6 py-12">
64
+ <!-- 标题和描述 -->
65
+ <div class="text-center mb-12">
66
+ <h2 class="text-4xl font-bold mb-4">AI 视频背景去除工具</h2>
67
+ <p class="text-gray-400 max-w-2xl mx-auto">上传您的视频,我们先进的AI技术将自动去除背景,让您专注于内容主体。免费用户可处理前6秒,付费用户无限制。</p>
68
+ </div>
69
+
70
+ <!-- 上传和处理区域 -->
71
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-8 mb-12">
72
+ <!-- 上传区域 -->
73
+ <div class="gradient-bg rounded-2xl p-8">
74
+ <div id="upload-area" class="upload-area rounded-xl p-8 text-center cursor-pointer">
75
+ <i class="fas fa-cloud-upload-alt text-4xl mb-4 text-white opacity-80"></i>
76
+ <h3 class="text-xl font-semibold mb-2">拖放视频文件到此处</h3>
77
+ <p class="text-gray-200 mb-4">或点击选择文件</p>
78
+ <p class="text-sm text-gray-300">支持MP4, MOV, AVI等格式,最大500MB</p>
79
+ <input type="file" id="video-upload" class="hidden" accept="video/*">
80
+ </div>
81
+
82
+ <!-- 视频信息 -->
83
+ <div id="video-info" class="mt-6 hidden">
84
+ <div class="flex justify-between items-center mb-2">
85
+ <span class="font-medium">视频信息</span>
86
+ <button id="change-video" class="text-blue-300 hover:text-blue-100 text-sm">更换视频</button>
87
+ </div>
88
+ <div class="bg-black bg-opacity-30 rounded-lg p-4">
89
+ <div class="flex items-center space-x-4 mb-3">
90
+ <i class="fas fa-file-video text-blue-300"></i>
91
+ <div>
92
+ <p id="video-name" class="font-medium truncate">video-sample.mp4</p>
93
+ <p id="video-duration" class="text-sm text-gray-300">00:15</p>
94
+ </div>
95
+ </div>
96
+ <div class="flex justify-between text-sm">
97
+ <span id="video-size">25.4 MB</span>
98
+ <span id="video-resolution">1920x1080</span>
99
+ </div>
100
+ </div>
101
+ </div>
102
+
103
+ <!-- 处理选项 -->
104
+ <div id="process-options" class="mt-6 hidden">
105
+ <div class="mb-4">
106
+ <label class="block font-medium mb-2">背景去除选项</label>
107
+ <div class="grid grid-cols-2 gap-3">
108
+ <button class="bg-blue-700 py-2 px-4 rounded-lg flex items-center justify-center space-x-2">
109
+ <i class="fas fa-magic"></i>
110
+ <span>自动</span>
111
+ </button>
112
+ <button class="bg-gray-800 hover:bg-gray-700 py-2 px-4 rounded-lg flex items-center justify-center space-x-2">
113
+ <i class="fas fa-sliders-h"></i>
114
+ <span>高级</span>
115
+ </button>
116
+ </div>
117
+ </div>
118
+
119
+ <div class="mb-4">
120
+ <label class="block font-medium mb-2">输出格式</label>
121
+ <select class="w-full bg-gray-800 border border-gray-700 rounded-lg px-4 py-2">
122
+ <option>MP4 (推荐)</option>
123
+ <option>MOV</option>
124
+ <option>GIF</option>
125
+ <option>透明通道 (PNG序列)</option>
126
+ </select>
127
+ </div>
128
+
129
+ <div class="flex items-center justify-between">
130
+ <div class="tooltip relative">
131
+ <i class="fas fa-info-circle text-gray-400"></i>
132
+ <div class="tooltip-text absolute z-10 invisible opacity-0 bg-gray-800 text-sm text-white rounded p-2 w-64 -left-32 -top-20 transition-all duration-300">
133
+ 免费用户只能处理视频的前6秒。升级到专业版可解锁完整视频处理。
134
+ </div>
135
+ </div>
136
+ <button id="process-btn" class="bg-green-600 hover:bg-green-700 py-3 px-6 rounded-lg font-medium flex items-center space-x-2">
137
+ <i class="fas fa-play"></i>
138
+ <span>开始处理</span>
139
+ </button>
140
+ </div>
141
+ </div>
142
+ </div>
143
+
144
+ <!-- 预览区域 -->
145
+ <div class="bg-gray-800 rounded-2xl p-8">
146
+ <h3 class="text-xl font-semibold mb-4">预览</h3>
147
+
148
+ <!-- 初始状态 -->
149
+ <div id="preview-placeholder" class="video-preview bg-gray-700 rounded-xl flex items-center justify-center">
150
+ <div class="text-center">
151
+ <i class="fas fa-video text-4xl mb-4 text-gray-500"></i>
152
+ <p class="text-gray-400">上传视频后预览将显示在这里</p>
153
+ </div>
154
+ </div>
155
+
156
+ <!-- 视频预览 -->
157
+ <div id="video-preview" class="hidden">
158
+ <video controls class="w-full rounded-xl mb-4"></video>
159
+ <div class="flex justify-between text-sm text-gray-400">
160
+ <span>原始视频</span>
161
+ <span>00:00 / <span id="preview-duration">00:00</span></span>
162
+ </div>
163
+ </div>
164
+
165
+ <!-- 处理结果预览 -->
166
+ <div id="result-preview" class="hidden">
167
+ <div class="relative">
168
+ <video controls class="w-full rounded-xl mb-4"></video>
169
+ <div class="absolute top-2 right-2 bg-black bg-opacity-70 px-2 py-1 rounded text-sm">
170
+ 已去除背景
171
+ </div>
172
+ </div>
173
+ <div class="flex justify-between text-sm text-gray-400 mb-4">
174
+ <span>处理后视频</span>
175
+ <span>00:00 / <span id="result-duration">00:00</span></span>
176
+ </div>
177
+
178
+ <div class="grid grid-cols-2 gap-3">
179
+ <button class="bg-blue-600 hover:bg-blue-700 py-2 px-4 rounded-lg flex items-center justify-center space-x-2">
180
+ <i class="fas fa-download"></i>
181
+ <span>下载</span>
182
+ </button>
183
+ <button class="bg-gray-700 hover:bg-gray-600 py-2 px-4 rounded-lg flex items-center justify-center space-x-2">
184
+ <i class="fas fa-redo"></i>
185
+ <span>重新处理</span>
186
+ </button>
187
+ </div>
188
+ </div>
189
+
190
+ <!-- 处理进度 -->
191
+ <div id="processing-status" class="hidden mt-6">
192
+ <div class="flex items-center justify-between mb-2">
193
+ <span class="font-medium">处理进度</span>
194
+ <span id="progress-percent" class="text-blue-400">0%</span>
195
+ </div>
196
+ <div class="w-full bg-gray-700 rounded-full h-2 mb-4">
197
+ <div id="progress-bar" class="progress-bar bg-blue-500 rounded-full" style="width: 0%"></div>
198
+ </div>
199
+ <p class="text-sm text-gray-400">AI正在处理您的视频,请稍候...</p>
200
+ <p id="time-remaining" class="text-sm text-gray-400 mt-2">预计剩余时间: 计算中...</p>
201
+ </div>
202
+ </div>
203
+ </div>
204
+
205
+ <!-- 付费升级提示 -->
206
+ <div id="upgrade-prompt" class="bg-gray-800 rounded-2xl p-6 mb-12 hidden">
207
+ <div class="flex flex-col md:flex-row items-center justify-between">
208
+ <div class="mb-4 md:mb-0">
209
+ <h3 class="text-xl font-semibold mb-2">需要处理完整视频?</h3>
210
+ <p class="text-gray-400">免费版只能处理前6秒。升级到专业版可解锁完整视频处理功能。</p>
211
+ </div>
212
+ <button class="bg-purple-600 hover:bg-purple-700 py-3 px-6 rounded-lg font-medium whitespace-nowrap">
213
+ 升级到专业版
214
+ </button>
215
+ </div>
216
+ </div>
217
+
218
+ <!-- 功能对比 -->
219
+ <div class="mb-12">
220
+ <h3 class="text-2xl font-semibold mb-6 text-center">免费版 vs 专业版</h3>
221
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
222
+ <div class="bg-gray-800 rounded-2xl p-6">
223
+ <div class="flex items-center justify-between mb-4">
224
+ <h4 class="text-xl font-medium">免费版</h4>
225
+ <span class="bg-blue-900 text-blue-300 px-3 py-1 rounded-full text-sm">当前版本</span>
226
+ </div>
227
+ <ul class="space-y-3">
228
+ <li class="flex items-start">
229
+ <i class="fas fa-check text-green-400 mt-1 mr-2"></i>
230
+ <span>免费处理视频前6秒</span>
231
+ </li>
232
+ <li class="flex items-start">
233
+ <i class="fas fa-check text-green-400 mt-1 mr-2"></i>
234
+ <span>基本背景去除质量</span>
235
+ </li>
236
+ <li class="flex items-start">
237
+ <i class="fas fa-times text-red-400 mt-1 mr-2"></i>
238
+ <span class="text-gray-400">无法处理完整视频</span>
239
+ </li>
240
+ <li class="flex items-start">
241
+ <i class="fas fa-times text-red-400 mt-1 mr-2"></i>
242
+ <span class="text-gray-400">无水印下载</span>
243
+ </li>
244
+ <li class="flex items-start">
245
+ <i class="fas fa-times text-red-400 mt-1 mr-2"></i>
246
+ <span class="text-gray-400">高级背景编辑工具</span>
247
+ </li>
248
+ </ul>
249
+ </div>
250
+ <div class="bg-gray-800 rounded-2xl p-6 border-2 border-purple-500 relative">
251
+ <div class="absolute -top-3 -right-3 bg-purple-500 text-white text-xs font-bold px-3 py-1 rounded-full">
252
+ 推荐
253
+ </div>
254
+ <div class="flex items-center justify-between mb-4">
255
+ <h4 class="text-xl font-medium">专业版</h4>
256
+ <span class="text-purple-300">$9.99/月</span>
257
+ </div>
258
+ <ul class="space-y-3">
259
+ <li class="flex items-start">
260
+ <i class="fas fa-check text-green-400 mt-1 mr-2"></i>
261
+ <span>完整视频处理</span>
262
+ </li>
263
+ <li class="flex items-start">
264
+ <i class="fas fa-check text-green-400 mt-1 mr-2"></i>
265
+ <span>高质量背景去除</span>
266
+ </li>
267
+ <li class="flex items-start">
268
+ <i class="fas fa-check text-green-400 mt-1 mr-2"></i>
269
+ <span>无水印下载</span>
270
+ </li>
271
+ <li class="flex items-start">
272
+ <i class="fas fa-check text-green-400 mt-1 mr-2"></i>
273
+ <span>高级背景编辑工具</span>
274
+ </li>
275
+ <li class="flex items-start">
276
+ <i class="fas fa-check text-green-400 mt-1 mr-2"></i>
277
+ <span>优先处理队列</span>
278
+ </li>
279
+ </ul>
280
+ <button class="w-full mt-6 bg-purple-600 hover:bg-purple-700 py-2 px-4 rounded-lg font-medium">
281
+ 立即升级
282
+ </button>
283
+ </div>
284
+ </div>
285
+ </div>
286
+ </main>
287
+
288
+ <!-- 页脚 -->
289
+ <footer class="bg-gray-800 py-8 px-6">
290
+ <div class="max-w-7xl mx-auto">
291
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8 mb-8">
292
+ <div>
293
+ <h4 class="text-lg font-semibold mb-4">VideoBG Remover</h4>
294
+ <p class="text-gray-400">使用AI技术轻松去除视频背景,为您的创意内容提供无限可能。</p>
295
+ </div>
296
+ <div>
297
+ <h4 class="text-lg font-semibold mb-4">产品</h4>
298
+ <ul class="space-y-2">
299
+ <li><a href="#" class="text-gray-400 hover:text-white transition">功能</a></li>
300
+ <li><a href="#" class="text-gray-400 hover:text-white transition">定价</a></li>
301
+ <li><a href="#" class="text-gray-400 hover:text-white transition">示例</a></li>
302
+ <li><a href="#" class="text-gray-400 hover:text-white transition">API</a></li>
303
+ </ul>
304
+ </div>
305
+ <div>
306
+ <h4 class="text-lg font-semibold mb-4">资源</h4>
307
+ <ul class="space-y-2">
308
+ <li><a href="#" class="text-gray-400 hover:text-white transition">帮助中心</a></li>
309
+ <li><a href="#" class="text-gray-400 hover:text-white transition">教程</a></li>
310
+ <li><a href="#" class="text-gray-400 hover:text-white transition">博客</a></li>
311
+ <li><a href="#" class="text-gray-400 hover:text-white transition">状态</a></li>
312
+ </ul>
313
+ </div>
314
+ <div>
315
+ <h4 class="text-lg font-semibold mb-4">联系我们</h4>
316
+ <ul class="space-y-2">
317
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Twitter</a></li>
318
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Facebook</a></li>
319
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Instagram</a></li>
320
+ <li><a href="#" class="text-gray-400 hover:text-white transition">support@videobgremover.com</a></li>
321
+ </ul>
322
+ </div>
323
+ </div>
324
+ <div class="pt-6 border-t border-gray-700 text-center text-gray-500 text-sm">
325
+ <p>© 2023 VideoBG Remover. 保留所有权利。</p>
326
+ </div>
327
+ </div>
328
+ </footer>
329
+
330
+ <script>
331
+ // DOM元素
332
+ const uploadArea = document.getElementById('upload-area');
333
+ const videoUpload = document.getElementById('video-upload');
334
+ const videoInfo = document.getElementById('video-info');
335
+ const processOptions = document.getElementById('process-options');
336
+ const previewPlaceholder = document.getElementById('preview-placeholder');
337
+ const videoPreview = document.getElementById('video-preview');
338
+ const resultPreview = document.getElementById('result-preview');
339
+ const processingStatus = document.getElementById('processing-status');
340
+ const upgradePrompt = document.getElementById('upgrade-prompt');
341
+ const changeVideoBtn = document.getElementById('change-video');
342
+ const processBtn = document.getElementById('process-btn');
343
+
344
+ // 拖放功能
345
+ uploadArea.addEventListener('dragover', (e) => {
346
+ e.preventDefault();
347
+ uploadArea.classList.add('dragover');
348
+ });
349
+
350
+ uploadArea.addEventListener('dragleave', () => {
351
+ uploadArea.classList.remove('dragover');
352
+ });
353
+
354
+ uploadArea.addEventListener('drop', (e) => {
355
+ e.preventDefault();
356
+ uploadArea.classList.remove('dragover');
357
+ if (e.dataTransfer.files.length) {
358
+ videoUpload.files = e.dataTransfer.files;
359
+ handleVideoUpload();
360
+ }
361
+ });
362
+
363
+ // 点击上传
364
+ uploadArea.addEventListener('click', () => {
365
+ videoUpload.click();
366
+ });
367
+
368
+ videoUpload.addEventListener('change', handleVideoUpload);
369
+
370
+ // 处理视频上传
371
+ function handleVideoUpload() {
372
+ const file = videoUpload.files[0];
373
+ if (!file) return;
374
+
375
+ // 显示视频信息
376
+ document.getElementById('video-name').textContent = file.name;
377
+ document.getElementById('video-size').textContent = formatFileSize(file.size);
378
+
379
+ // 创建视频元素获取时长和分辨率
380
+ const video = document.createElement('video');
381
+ video.src = URL.createObjectURL(file);
382
+ video.onloadedmetadata = () => {
383
+ document.getElementById('video-duration').textContent = formatTime(video.duration);
384
+ document.getElementById('video-resolution').textContent = `${video.videoWidth}x${video.videoHeight}`;
385
+ document.getElementById('preview-duration').textContent = formatTime(video.duration);
386
+
387
+ // 显示付费提示(如果视频超过6秒)
388
+ if (video.duration > 6) {
389
+ upgradePrompt.classList.remove('hidden');
390
+ } else {
391
+ upgradePrompt.classList.add('hidden');
392
+ }
393
+ };
394
+
395
+ // 显示预览
396
+ const previewVideo = videoPreview.querySelector('video');
397
+ previewVideo.src = URL.createObjectURL(file);
398
+
399
+ // 切换UI状态
400
+ videoInfo.classList.remove('hidden');
401
+ processOptions.classList.remove('hidden');
402
+ previewPlaceholder.classList.add('hidden');
403
+ videoPreview.classList.remove('hidden');
404
+ resultPreview.classList.add('hidden');
405
+ }
406
+
407
+ // 更换视频
408
+ changeVideoBtn.addEventListener('click', () => {
409
+ videoUpload.value = '';
410
+ videoInfo.classList.add('hidden');
411
+ processOptions.classList.add('hidden');
412
+ previewPlaceholder.classList.remove('hidden');
413
+ videoPreview.classList.add('hidden');
414
+ upgradePrompt.classList.add('hidden');
415
+ });
416
+
417
+ // 开始处理
418
+ processBtn.addEventListener('click', () => {
419
+ // 模拟处理过程
420
+ videoPreview.classList.add('hidden');
421
+ processingStatus.classList.remove('hidden');
422
+
423
+ let progress = 0;
424
+ const progressInterval = setInterval(() => {
425
+ progress += Math.random() * 5;
426
+ if (progress > 100) progress = 100;
427
+
428
+ document.getElementById('progress-bar').style.width = `${progress}%`;
429
+ document.getElementById('progress-percent').textContent = `${Math.floor(progress)}%`;
430
+
431
+ // 随机剩余时间
432
+ const remaining = Math.floor((100 - progress) / 5);
433
+ document.getElementById('time-remaining').textContent = `预计剩余时间: ${remaining}秒`;
434
+
435
+ if (progress === 100) {
436
+ clearInterval(progressInterval);
437
+ setTimeout(() => {
438
+ processingStatus.classList.add('hidden');
439
+ resultPreview.classList.remove('hidden');
440
+
441
+ // 设置处理后的视频预览(实际应用中这里应该是处理后的视频)
442
+ const resultVideo = resultPreview.querySelector('video');
443
+ resultVideo.src = videoPreview.querySelector('video').src;
444
+ document.getElementById('result-duration').textContent =
445
+ document.getElementById('preview-duration').textContent;
446
+ }, 1000);
447
+ }
448
+ }, 500);
449
+ });
450
+
451
+ // 辅助函数
452
+ function formatFileSize(bytes) {
453
+ if (bytes === 0) return '0 Bytes';
454
+ const k = 1024;
455
+ const sizes = ['Bytes', 'KB', 'MB', 'GB'];
456
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
457
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
458
+ }
459
+
460
+ function formatTime(seconds) {
461
+ const mins = Math.floor(seconds / 60);
462
+ const secs = Math.floor(seconds % 60);
463
+ return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
464
+ }
465
+ </script>
466
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=guanwei1225/ai" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
467
+ </html>