-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
205 lines (172 loc) · 4.45 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
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
<!DOCTYPE html>
<html>
<head>
<title>D-ID Streaming POC</title>
<!-- added google fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Mulish:wght@300;400;700&display=swap" rel="stylesheet" />
<style>
#user-input-field {
width: 80%;
/* Set desired width here */
padding: 8px;
/* Adding some padding for better appearance */
box-sizing: border-box;
/* So the width includes padding */
margin: 0 auto;
/* Centering the input box */
display: block;
/* To apply margin auto */
}
body {
background-color: #000000;
color: #ffffff;
font-family: 'Mulish', sans-serif;
margin: 0px;
padding: 0px;
}
body::-webkit-scrollbar {
display: none;
/* 隱藏滾動條 */
}
.peerConnectionState-new {
color: cornflowerblue;
}
.peerConnectionState-connecting {
color: orange;
}
.peerConnectionState-connected {
color: green;
}
.peerConnectionState-disconnected,
.peerConnectionState-closed,
.peerConnectionState-failed {
color: red;
}
.iceConnectionState-new {
color: cornflowerblue;
}
.iceConnectionState-checking {
color: orange;
}
.iceConnectionState-connected,
.iceConnectionState-completed {
color: green;
}
.peerConnectionState-disconnected,
.peerConnectionState-closed,
.peerConnectionState-failed {
color: red;
}
.iceGatheringState-new {
color: cornflowerblue;
}
.iceGatheringState-gathering {
color: orange;
}
.iceGatheringState-complete {
color: black;
}
.signalingState-stable {
color: green;
}
.signalingState-have-local-offer,
.signalingState-have-remote-offer,
.signalingState-have-local-pranswer,
.signalingState-have-remote-pranswer {
color: cornflowerblue;
}
.signalingState-closed {
color: red;
}
.streamingState-streaming {
color: green;
}
.streamingState-empty {
color: grey;
}
/* added css from here */
body * {
font-family: 'Mulish', sans-serif;
text-align: center;
}
#content {
width: 100%;
height: 100%;
/* position: relative;
margin: 0 auto; */
}
#buttons {
clear: both;
padding: 0 0 0 0;
text-align: center;
}
button {
padding: 10px 20px;
border-radius: 5px;
border: none;
font-size: 16px;
margin: 0 5px;
background-color: #7459fe;
color: #fff;
}
button:hover {
background-color: #9480ff;
cursor: pointer;
transition: all 0.2s ease-out;
}
#status {
clear: both;
padding: 20px 0 0 0;
text-align: left;
display: inline-block;
zoom: 1;
line-height: 140%;
font-size: 15px;
}
#status div {
padding-bottom: 10px;
}
video {
width: 100vw;
/* 使用整個視窗寬度 */
height: 100vh;
/* 使用整個視窗高度 */
object-fit: contain;
/* 影片保持原始比例,完全顯示在容器中 */
object-position: center top;
/* 調整影片在容器中的位置,這裡設置為中間上方 */
}
</style>
</head>
<body>
<!-- adde "id=content" -->
<div id="content">
<!-- added "id=video-wrapper" -->
<!-- <div id="video-wrapper"> -->
<div>
<video id="talk-video" autoplay></video>
</div>
<!-- </div> -->
<!-- <br /> -->
<!-- added div#buttons -->
<div id="buttons">
<button id="connect-button" type="button">Connect</button>
<button id="talk-button" type="button">Start</button>
<button id="destroy-button" type="button">Destroy</button>
</div>
<!-- added div#status -->
<div id="status">
<!-- removed the wrapping <div> tags -->
ICE gathering status: <label id="ice-gathering-status-label"></label><br />
ICE status: <label id="ice-status-label"></label><br />
Peer connection status: <label id="peer-status-label"></label><br />
Signaling status: <label id="signaling-status-label"></label><br />
Streaming status: <label id="streaming-status-label"></label><br />
</div>
</div>
<script src="/socket.io/socket.io.js"></script>
<script type="module" src="./index.js"></script>
</body>
</html>