-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
99 lines (91 loc) · 2.32 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
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
<!DOCTYPE html>
<html>
<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>webrtc-internal</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.container {
width: 100%;
display: flex;
display: -webkit-flex;
justify-content: space-around;
padding-top: 20px;
}
.video-box {
position: relative;
width: 800px;
height: 400px;
}
#remote-video {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
border: 1px solid #eee;
background-color: #f2f6fc;
}
#local-video {
position: absolute;
right: 0;
bottom: 0;
width: 240px;
height: 120px;
object-fit: cover;
border: 1px solid #eee;
background-color: #ebeef5;
}
.start-button {
position: absolute;
left: 50%;
top: 50%;
width: 100px;
display: block;
line-height: 40px;
outline: none;
color: #fff;
background-color: #409eff;
border: none;
border-radius: 4px;
cursor: pointer;
transform: translate(-50%, -50%);
}
.logger {
width: 40%;
padding: 14px;
line-height: 1.5;
color: #4fbf40;
border-radius: 6px;
background-color: #272727;
}
.logger .error {
color: #dd4a68;
}
</style>
</head>
<body>
<div class="container">
<div class="video-box">
<video id="remote-video" autoplay muted></video>
<video id="local-video" autoplay muted></video>
<audio id="remote-audio" autoplay></audio>
<button class="start-button" onclick="startLive()">start</button>
</div>
</div>
<div>functions:</div>
<div>
<button id="sub" onclick="sub()">sub</button>
<button id="unsub" onclick="unsub()">unsub</button>
</div>
<script src="./dist/index.js"></script>
<!-- <script src="https://ltsg123.github.io/webrtc-internals/dist/index.js"></script> -->
<script src="peer.js"></script>
<script src="index.js"></script>
</body>
</html>