-
Notifications
You must be signed in to change notification settings - Fork 8
/
settings.html
294 lines (277 loc) · 11.8 KB
/
settings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
}
.container {
width: 100%;
margin: 10px auto;
}
.two-column {
display: flex;
gap: 10px;
}
.column {
flex: 1;
padding: 10px;
}
#column1 {
text-align: left;
flex-direction: column;
align-items: left;
min-height: 500px;
}
#column2 {
text-align: center; /* Center the rectangle horizontally */
flex-direction: column;
align-items: center;
justify-content: center;
min-height: 500px;
}
/*
#sample_video_frame {
width: 640px;
height: 360px;
background-color: blue;
margin: 10px auto;
}
#src_textarea_container {
display: block,
width: 720px,
height: 120px,
margin: 10px auto;
}
#src_textarea {
display: block,
width: 100%,
height: 100%,
margin: 10px auto;
text-align: left;
justify-content: center;
}
#dst_textarea_container {
display: block,
width: 720px,
height: 120px,
margin: 10px auto;
}
#dst_textarea {
display: block,
width: 100%,
height: 100%,
margin: 10px auto;
text-align: left;
}
*/
#my_yt_iframe {
width: 640px;
height: 360px;
background-color: blue;
margin: 10px auto;
}
#select_src_font {
width: 160px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_font_size {
width: 40px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_font_color {
width: 50px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_container_width_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_container_height_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_container_top_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_container_left_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_container_color {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_src_container_opacity {
width: 80px; /* Adjust width as needed */
height: 4px; /* Adjust height as needed */
}
#select_dst_language {
width: 160px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#select_dst_dialect {
width: 240px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#select_dst_font {
width: 160px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_font_size {
width: 40px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_font_color {
width: 50px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_container_width_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_container_height_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_container_top_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_container_left_factor {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_container_color {
width: 56px; /* Adjust width as needed */
height: 16px; /* Adjust height as needed */
}
#input_dst_container_opacity {
width: 80px; /* Adjust width as needed */
height: 4px; /* Adjust height as needed */
}
</style>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta http-equiv='X-UA-Compatible' content='ie=edge'>
<title>Language Setup</title>
</head>
<body>
<h1 style="font-size: 16px">Live Translate v0.2.9</h1>
<br>
<h2 style="font-size: 14px">Options</h2>
<div class="container">
<div class="two-column">
<div class="column left-column" id='column1'>
<label style='font-size: 12px'>Audio Language </label>
<select id='select_src_language' style='width: 160px' style='font-size: 12px'></select>
<select id='select_src_dialect' style='width: 240px' style='font-size: 12px'></select>
<br>
<input type="checkbox" id="checkbox_show_src" name="checkbox_show_src" style='font-size: 12px' checked='true;'>
<label style='font-size: 12px'> Show recognized audio text </label>
<br>
<input type="checkbox" id="checkbox_show_timestamp_src" name="checkbox_show_timestamp_src" style='font-size: 12px' checked='true;'>
<label style='font-size: 12px'> Show timestamps </label>
<br>
<label for="select_src_font" style="font-size: 12px">Subtitle Font </label>
<select id="select_src_font" style="font-size: 12px"></select>
<input type="number" id="input_src_font_size" min="1" value="18" style='font-size:12px'>
<input type="color" id="input_src_font_color" value="#ffff00" style='font-size:12px'>
<br>
<label for="input_src_container_width_factor" style="font-size: 12px" >Container Width </label>
<input type="number" id="input_src_container_width_factor" min="0" max="1" step="0.001" value="0.795" style='font-size:12px'>
<label for="src_container_width_continuing_text" style="font-size: 12px" >x Video Width</label>
<br>
<label for="input_src_container_height_factor" style="font-size: 12px">Container Height </label>
<input type="number" id="input_src_container_height_factor" min="0" max="1" step="0.001" value="0.165" style='font-size:12px'>
<label for="src_container_height_continuing_text" style="font-size: 12px">x Video Height </label>
<br>
<label for="input_src_container_top_factor" style="font-size: 12px">Container Top </label>
<input type="number" id="input_src_container_top_factor" min="0" max="1" step="0.01" value="0.01" style='font-size:12px'>
<label for="src_container_top_continuing_text" style="font-size: 12px">x Video Height</label>
<br>
<label for="input_src_container_left_factor" style="font-size: 12px">Container Left </label>
<input type="number" id="input_src_container_left_factor" min="0" max="1" step="0.01" value="0.1" style='font-size:12px'>
<label for="src_container_left_continuing_text" style="font-size: 12px">x Video Width</label>
<input type="checkbox" id="checkbox_centerize_src" name="checkbox_centerize_src" style='font-size: 12px' checked='true;'>
<label style='font-size: 12px'> Centerize Horizontally </label>
<br>
<label for="input_src_container_color" style="font-size: 12px">Container Color </label>
<input type="color" id="input_src_container_color" value="#000000" style='font-size:12px'>
<br>
<label for="input_src_container_opacity" style="font-size: 12px">Container Opacity </label>
<input type="range" id="input_src_container_opacity" min="0" max="1" step="0.01" value="0.3" style='font-size:12px'>
<br>
<br>
<label style='font-size: 12px'>Translation </label>
<select id='select_dst_language' style='width:160px' style='font-size:12px'></select>
<select id='select_dst_dialect' style='width:240px' style='font-size:12px'></select>
<br>
<input type="checkbox" id="checkbox_show_dst" name="checkbox_show_dst" style='font-size:12px' checked='true;'>
<label style='font-size: 12px'> Show translation text</label>
<br>
<input type="checkbox" id="checkbox_show_timestamp_dst" name="checkbox_show_timestamp_dst" style='font-size: 12px' checked='true;'>
<label style='font-size: 12px'> Show timestamps </label>
<br>
<label for="select_dst_font" style="font-size: 12px">Subtitle Font </label>
<select id="select_dst_font" style="font-size: 12px"></select>
<input type="number" id="input_dst_font_size" min="1" value="18" style='font-size:12px'>
<input type="color" id="input_dst_font_color" value="#ffff00" style='font-size:12px'>
<br>
<label for="input_dst_container_width_factor" style="font-size: 12px">Container Width </label>
<input type="number" id="input_dst_container_width_factor" min="0" max="1" step="0.001" value="0.795" style='font-size:12px'>
<label for="dst_container_width_continuing_text" style="font-size: 12px">x Video Width</label>
<br>
<label for="input_dst_container_height_factor" style="font-size: 12px">Container Height </label>
<input type="number" id="input_dst_container_height_factor" min="0" max="1" step="0.001" value="0.225" style='font-size:12px'>
<label for="dst_container_height_continuing_text" style="font-size: 12px">x Video Height</label>
<br>
<label for="input_dst_container_top_factor" style="font-size: 12px">Container Top </label>
<input type="number" id="input_dst_container_top_factor" min="0" max="1" step="0.01" value="0.65" style='font-size:12px'>
<label for="dst_container_top_continuing_text" style="font-size: 12px">x Video Height</label>
<br>
<label for="input_dst_container_left_factor" style="font-size: 12px">Container Left </label>
<input type="number" id="input_dst_container_left_factor" min="0" max="1" step="0.01" value="0.1" style='font-size:12px'>
<label for="dst_container_left_continuing_text" style="font-size: 12px">x Video Width</label>
<input type="checkbox" id="checkbox_centerize_dst" name="checkbox_centerize_dst" style='font-size: 12px' checked='true;'>
<label style='font-size: 12px'> Centerize Horizontally </label>
<br>
<label for="input_dst_container_color" style="font-size: 12px">Container Color </label>
<input type="color" id="input_dst_container_color" value="#000000" style='font-size:12px'>
<br>
<label for="input_dst_container_opacity" style="font-size: 12px">Container Opacity </label>
<input type="range" id="input_dst_container_opacity" min="0" max="1" step="0.01" value="0.3" style='font-size:12px'>
<br>
<br>
<label for="input_pause_threshold" style='font-size: 12px'>Pause Threshold </label>
<input style='width:60px' type="number" id="input_pause_threshold" min="0" step="1" value="5000" style='font-size:12px'>
<label for="pause_threshold_continuing_text" style='font-size: 12px'> (in miliseconds, silent duration that will trigger speech engine to restart)</label>
<br><br>
<button id='save_button' style='position:relative'>Save</button>
<br><br>
</div>
<div class="column right-column" id='column2'>
<div class="iframe_header_unit">
<div class="iframe_container">
<div class="yt_iframe">
<iframe id="my_yt_iframe" width="640" height="360" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope;" allowfullscreen="true" class="fillWidth"></iframe>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="js/jquery.min.js"></script>
<link rel="stylesheet" href="css/jquery-ui.css">
<script src="js/jquery-ui.min.js"></script>
<script src='js/setting.js'></script>
</html>