Spaces:
Paused
Paused
Update html.html
Browse files
html.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Video Processing</title>
|
| 7 |
|
| 8 |
-
<!--
|
| 9 |
<style>
|
| 10 |
body {
|
| 11 |
font-family: Arial, sans-serif;
|
|
@@ -83,6 +83,11 @@
|
|
| 83 |
font-size: 14px;
|
| 84 |
color: #555;
|
| 85 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
</style>
|
| 87 |
</head>
|
| 88 |
<body>
|
|
@@ -102,13 +107,13 @@
|
|
| 102 |
<option value="Change Video Speed">Change Video Speed</option>
|
| 103 |
</select><br><br>
|
| 104 |
|
| 105 |
-
<!-- Copy Streams
|
| 106 |
<div id="copy-streams-container" class="hidden">
|
| 107 |
<label for="copy_streams">Copy Streams (No Re-encoding):</label>
|
| 108 |
<input type="checkbox" name="copy_streams" id="copy_streams"><br><br>
|
| 109 |
</div>
|
| 110 |
|
| 111 |
-
<!--
|
| 112 |
<div id="format-options" class="hidden options-container">
|
| 113 |
<label for="format">Select Output Format:</label>
|
| 114 |
<select name="format" id="format">
|
|
@@ -121,7 +126,7 @@
|
|
| 121 |
</select><br><br>
|
| 122 |
</div>
|
| 123 |
|
| 124 |
-
<!-- Trim Video
|
| 125 |
<div id="trim-options" class="hidden options-container">
|
| 126 |
<label for="start_time">Start Time (for Trim Video):</label>
|
| 127 |
<input type="text" name="start_time" id="start_time"><br><br>
|
|
@@ -130,7 +135,7 @@
|
|
| 130 |
<input type="text" name="duration" id="duration"><br><br>
|
| 131 |
</div>
|
| 132 |
|
| 133 |
-
<!-- Resize Video
|
| 134 |
<div id="resize-options" class="hidden options-container">
|
| 135 |
<label for="width">Width (for Resize Video):</label>
|
| 136 |
<input type="text" name="width" id="width"><br><br>
|
|
@@ -139,7 +144,7 @@
|
|
| 139 |
<input type="text" name="height" id="height"><br><br>
|
| 140 |
</div>
|
| 141 |
|
| 142 |
-
<!-- Change Video Speed
|
| 143 |
<div id="speed-options" class="hidden options-container">
|
| 144 |
<label for="speed_factor">Speed Factor (for Change Video Speed):</label>
|
| 145 |
<input type="text" name="speed_factor" id="speed_factor"><br><br>
|
|
@@ -150,7 +155,7 @@
|
|
| 150 |
</div>
|
| 151 |
|
| 152 |
<script>
|
| 153 |
-
// Show
|
| 154 |
document.getElementById('action').addEventListener('change', function() {
|
| 155 |
const action = this.value;
|
| 156 |
const copyStreamsContainer = document.getElementById('copy-streams-container');
|
|
@@ -169,18 +174,18 @@
|
|
| 169 |
// Show options based on selected action
|
| 170 |
if (action === 'Trim Video') {
|
| 171 |
trimOptions.classList.remove('hidden');
|
| 172 |
-
copyStreamsContainer.classList.remove('hidden'); // Show for Trim Video
|
| 173 |
} else if (action === 'Resize Video') {
|
| 174 |
resizeOptions.classList.remove('hidden');
|
| 175 |
} else if (action === 'Change Video Speed') {
|
| 176 |
speedOptions.classList.remove('hidden');
|
| 177 |
} else if (action === 'Convert Format') {
|
| 178 |
-
formatOptions.classList.remove('hidden');
|
| 179 |
-
copyStreamsContainer.classList.remove('hidden'); // Show for Convert Format
|
| 180 |
}
|
| 181 |
});
|
| 182 |
|
| 183 |
-
// Trigger the change event to set initial visibility
|
| 184 |
document.getElementById('action').dispatchEvent(new Event('change'));
|
| 185 |
</script>
|
| 186 |
</body>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Video Processing</title>
|
| 7 |
|
| 8 |
+
<!-- Add some basic styling for better visuals -->
|
| 9 |
<style>
|
| 10 |
body {
|
| 11 |
font-family: Arial, sans-serif;
|
|
|
|
| 83 |
font-size: 14px;
|
| 84 |
color: #555;
|
| 85 |
}
|
| 86 |
+
|
| 87 |
+
.form-container select,
|
| 88 |
+
.form-container input {
|
| 89 |
+
background-color: #f9f9f9;
|
| 90 |
+
}
|
| 91 |
</style>
|
| 92 |
</head>
|
| 93 |
<body>
|
|
|
|
| 107 |
<option value="Change Video Speed">Change Video Speed</option>
|
| 108 |
</select><br><br>
|
| 109 |
|
| 110 |
+
<!-- Show Copy Streams checkbox only for Convert Format and Trim Video -->
|
| 111 |
<div id="copy-streams-container" class="hidden">
|
| 112 |
<label for="copy_streams">Copy Streams (No Re-encoding):</label>
|
| 113 |
<input type="checkbox" name="copy_streams" id="copy_streams"><br><br>
|
| 114 |
</div>
|
| 115 |
|
| 116 |
+
<!-- Inputs for Convert Format action -->
|
| 117 |
<div id="format-options" class="hidden options-container">
|
| 118 |
<label for="format">Select Output Format:</label>
|
| 119 |
<select name="format" id="format">
|
|
|
|
| 126 |
</select><br><br>
|
| 127 |
</div>
|
| 128 |
|
| 129 |
+
<!-- Inputs for Trim Video action -->
|
| 130 |
<div id="trim-options" class="hidden options-container">
|
| 131 |
<label for="start_time">Start Time (for Trim Video):</label>
|
| 132 |
<input type="text" name="start_time" id="start_time"><br><br>
|
|
|
|
| 135 |
<input type="text" name="duration" id="duration"><br><br>
|
| 136 |
</div>
|
| 137 |
|
| 138 |
+
<!-- Inputs for Resize Video action -->
|
| 139 |
<div id="resize-options" class="hidden options-container">
|
| 140 |
<label for="width">Width (for Resize Video):</label>
|
| 141 |
<input type="text" name="width" id="width"><br><br>
|
|
|
|
| 144 |
<input type="text" name="height" id="height"><br><br>
|
| 145 |
</div>
|
| 146 |
|
| 147 |
+
<!-- Inputs for Change Video Speed action -->
|
| 148 |
<div id="speed-options" class="hidden options-container">
|
| 149 |
<label for="speed_factor">Speed Factor (for Change Video Speed):</label>
|
| 150 |
<input type="text" name="speed_factor" id="speed_factor"><br><br>
|
|
|
|
| 155 |
</div>
|
| 156 |
|
| 157 |
<script>
|
| 158 |
+
// Show or hide the corresponding inputs based on selected action
|
| 159 |
document.getElementById('action').addEventListener('change', function() {
|
| 160 |
const action = this.value;
|
| 161 |
const copyStreamsContainer = document.getElementById('copy-streams-container');
|
|
|
|
| 174 |
// Show options based on selected action
|
| 175 |
if (action === 'Trim Video') {
|
| 176 |
trimOptions.classList.remove('hidden');
|
| 177 |
+
copyStreamsContainer.classList.remove('hidden'); // Show the copy streams option for Trim Video
|
| 178 |
} else if (action === 'Resize Video') {
|
| 179 |
resizeOptions.classList.remove('hidden');
|
| 180 |
} else if (action === 'Change Video Speed') {
|
| 181 |
speedOptions.classList.remove('hidden');
|
| 182 |
} else if (action === 'Convert Format') {
|
| 183 |
+
formatOptions.classList.remove('hidden'); // Show the format selection for Convert Format
|
| 184 |
+
copyStreamsContainer.classList.remove('hidden'); // Show the copy streams option for Convert Format
|
| 185 |
}
|
| 186 |
});
|
| 187 |
|
| 188 |
+
// Trigger the change event to set initial visibility based on the default selection
|
| 189 |
document.getElementById('action').dispatchEvent(new Event('change'));
|
| 190 |
</script>
|
| 191 |
</body>
|