Repository navigation
Expand file tree
/
Copy pathvideo.html
More file actions
49 lines (46 loc) · 1.45 KB
/
Copy pathvideo.html
File metadata and controls
49 lines (46 loc) · 1.45 KB
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
<!DOCTYPE html>
<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>Document</title>
</head>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
html,body {
width: 100%;
height: 100%;
overflow: hidden;
}
.videoBox,
.video {
width: 100vw;
height: 100vh;
object-fit: cover
}
</style>
<body>
<div class="videoBox">
<!-- <video class="video" autoplay="autoplay" loop='loop' muted src="https://static.looklook.cn/10dian/videos/video.f272cc4.mp4"></video> -->
<!-- <video class="video" autoplay="autoplay" loop='loop' muted src="http://192.168.10.235:8082/tmp/vod/inputfile.mp4"></video> -->
<!-- <video controls autoplay>
<source src="http://ivi.bupt.edu.cn/hls/cctv1hd.m3u8" type="application/vnd.apple.mpegurl" />
<p class="warning">Your browser does not support HTML5 video.</p>
</video> -->
<!-- <audio src="audio.mp3" autoplay="autoplay" loop='loop' muted id="audio"></audio> -->
<!-- <button style="width: 200px; height: 200px;" id="button"> Play Audio </button> -->
</div>
</body>
<script type="text/javascript">
let body = document.querySelector('body')
body.addEventListener('click', () => {
let audios = document.createElement('audio')
audios.src = 'file:///Users/fanroy/Documents/JavaScript-Basic-Study/audio.mp3';
audios.play()
})
</script>
</html>