Spaces:
Paused
Paused
Update html.html
Browse files
html.html
CHANGED
@@ -3,10 +3,75 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<title>Video Processing Tool</title>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
<script>
|
7 |
function processVideo(event) {
|
8 |
event.preventDefault();
|
9 |
const formData = new FormData(document.getElementById('video-form'));
|
|
|
|
|
|
|
10 |
|
11 |
fetch('/process', { method: 'POST', body: formData })
|
12 |
.then(response => {
|
@@ -22,7 +87,11 @@
|
|
22 |
a.click();
|
23 |
a.remove();
|
24 |
})
|
25 |
-
.catch(error => alert(error.message))
|
|
|
|
|
|
|
|
|
26 |
}
|
27 |
</script>
|
28 |
</head>
|
@@ -46,5 +115,8 @@
|
|
46 |
|
47 |
<button type="submit">Process Video</button>
|
48 |
</form>
|
|
|
|
|
|
|
49 |
</body>
|
50 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<title>Video Processing Tool</title>
|
6 |
+
<style>
|
7 |
+
body {
|
8 |
+
font-family: Arial, sans-serif;
|
9 |
+
background-color: #f4f4f9;
|
10 |
+
margin: 0;
|
11 |
+
padding: 20px;
|
12 |
+
color: #333;
|
13 |
+
}
|
14 |
+
|
15 |
+
h1 {
|
16 |
+
color: #333;
|
17 |
+
text-align: center;
|
18 |
+
}
|
19 |
+
|
20 |
+
form {
|
21 |
+
background: #fff;
|
22 |
+
max-width: 500px;
|
23 |
+
margin: auto;
|
24 |
+
padding: 20px;
|
25 |
+
border-radius: 5px;
|
26 |
+
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
27 |
+
}
|
28 |
+
|
29 |
+
label {
|
30 |
+
font-weight: bold;
|
31 |
+
display: block;
|
32 |
+
margin-top: 10px;
|
33 |
+
}
|
34 |
+
|
35 |
+
input[type="file"],
|
36 |
+
select,
|
37 |
+
input[type="text"],
|
38 |
+
button {
|
39 |
+
width: 100%;
|
40 |
+
padding: 8px;
|
41 |
+
margin-top: 5px;
|
42 |
+
margin-bottom: 10px;
|
43 |
+
border: 1px solid #ddd;
|
44 |
+
border-radius: 4px;
|
45 |
+
}
|
46 |
+
|
47 |
+
button {
|
48 |
+
background-color: #28a745;
|
49 |
+
color: #fff;
|
50 |
+
border: none;
|
51 |
+
cursor: pointer;
|
52 |
+
font-weight: bold;
|
53 |
+
}
|
54 |
+
|
55 |
+
button:hover {
|
56 |
+
background-color: #218838;
|
57 |
+
}
|
58 |
+
|
59 |
+
/* Processing indicator */
|
60 |
+
#processing-indicator {
|
61 |
+
display: none;
|
62 |
+
text-align: center;
|
63 |
+
color: #ff9900;
|
64 |
+
font-weight: bold;
|
65 |
+
margin-top: 10px;
|
66 |
+
}
|
67 |
+
</style>
|
68 |
<script>
|
69 |
function processVideo(event) {
|
70 |
event.preventDefault();
|
71 |
const formData = new FormData(document.getElementById('video-form'));
|
72 |
+
|
73 |
+
// Show processing indicator
|
74 |
+
document.getElementById('processing-indicator').style.display = 'block';
|
75 |
|
76 |
fetch('/process', { method: 'POST', body: formData })
|
77 |
.then(response => {
|
|
|
87 |
a.click();
|
88 |
a.remove();
|
89 |
})
|
90 |
+
.catch(error => alert(error.message))
|
91 |
+
.finally(() => {
|
92 |
+
// Hide processing indicator
|
93 |
+
document.getElementById('processing-indicator').style.display = 'none';
|
94 |
+
});
|
95 |
}
|
96 |
</script>
|
97 |
</head>
|
|
|
115 |
|
116 |
<button type="submit">Process Video</button>
|
117 |
</form>
|
118 |
+
|
119 |
+
<!-- Processing indicator -->
|
120 |
+
<div id="processing-indicator">Processing your video, please wait...</div>
|
121 |
</body>
|
122 |
</html>
|