-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
53 lines (46 loc) · 1.87 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="icon" href="icon.png">
<link rel="shortcut icon" href="icon.png">
<title>ASCII字符画视频流 - 自动实时转换视频到ASCII字符画视频</title>
<link href="index.css" rel="stylesheet">
</head>
<body>
<video id="video1" class="hidden" controls preload="auto" src="nu_chi_1080p.mp4" poster="nu_chi_1080p_poster.jpg"></video>
<canvas id="cv"></canvas>
<pre id="txt"></pre>
<div class="clear"></div>
<footer id="footer">
<div class="range_div">
<p style="margin-left: 10px;">
点击ASCII字符画可播放/暂停视频
</p>
<p style="margin-left: 10px;">
调整ASCII字符画的字号:
<br>
(字号越小分辨率越高,占用的CPU百分比也就越高)
</p>
<p>
<input id="font_size_range" type="range" min="2" max="16" value="2" step="2" oninput="change_font_size()"
onchange="change_font_size()" />
当前字号: <span id="font_size"></span>px(像素)
</p>
</div>
<div class="upload-div">
<p>
<input id="show_video_btn" value="显示/隐藏原始视频" type="button" onclick="toggle_video()">
</p>
<p>
想要换一个视频?
</p>
<input name="file" id="upload-button" accept="video/mp4,video/webm,video/ogg" title="" type="file">
<input id="text-button" value="点我选择视频" type="button">
</div>
</footer>
<script src="index.js"></script>
</body>
</html>