-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathESP32CAM_stream.html
76 lines (76 loc) · 2.13 KB
/
ESP32CAM_stream.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ESP32-CAM + Livestream Audio</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<style>
body {
background-color: #FFF;
}
.container1 {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
height: 100%;
}
.container2 {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
height: 100%;
}
.block {
width: 200px;
height: 200px;
background-color: gray;
margin: 10px;
display: flex;
justify-content: center;
align-items: center;
}
#video{
border: 0;
}
#audio{
border: 0;
}
#motor{
border: 0;
}
#tbl{
background-color: #000;
}
</style>
<script>
function myFunction() {
var x = document.getElementById("audio");
const btn = document.getElementById("myButton");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</script>
</head>
<body>
<h1>ESP32-CAM + Livestream Audio</h1>
<div class="container1" style="overflow-x:auto;">
<table id="tbl" style="overflow-x:auto;">
<tr>
<td><iframe id="video" src="https://go2rtc.local/stream.html?src=ESP32-CAM_video&mode=mjpeg" allow="camera" width="640" height="480"></iframe></td>
</tr>
<tr>
<td><iframe id="audio" src="https://go2rtc.local/stream.html?src=ESP32-CAM_audio" width="640" height="60" style="display:none"></iframe></td>
</tr>
<tr>
<td><button id="myButton"onclick="myFunction()">Sound</button></td>
</tr>
</table>
</div>
</body>
</html>