-
Notifications
You must be signed in to change notification settings - Fork 179
Expand file tree
/
Copy pathindex.html
More file actions
219 lines (191 loc) · 5.23 KB
/
Copy pathindex.html
File metadata and controls
219 lines (191 loc) · 5.23 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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<!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>
.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;
}
.streamEvent-started {
color: green;
}
.streamEvent-done {
color: orange;
}
.streamEvent-ready {
color: green;
}
.streamEvent-error {
color: red;
}
.streamEvent-dont-care {
color: gray;
}
/* added css from here */
body * {
font-family: 'Mulish', sans-serif;
text-align: center;
}
#content {
width: 820px;
position: relative;
margin: 0 auto;
}
.button-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
}
.button-row {
display: flex;
flex-direction: row;
justify-content: center;
gap: 10px;
}
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-wrapper {
background: url(bg.png);
height: 500px;
background-position: top;
}
#video-wrapper div {
position: relative;
height: 100%;
width: 400px;
margin: 0 auto;
}
video {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
/*border:1px solid;*/
border-radius: 50%;
background-color: #fff;
object-fit: cover;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
background-image: url("alex_v2_idle_image.png");
}
</style>
</head>
<body>
<!-- adde "id=content" -->
<div id="content">
<!-- added "id=video-wrapper" -->
<div id="video-wrapper">
<div>
<video id="idle-video-element" width="400" height="400" autoplay loop style="opacity: 1"></video>
<video id="stream-video-element" width="400" height="400" autoplay style="opacity: 0"></video>
</div>
</div>
<br />
<!-- added div#buttons -->
<div class="button-container">
<div class="button-row">
<button id="connect-button" type="button">Connect</button>
<button id="destroy-button" type="button">Destroy</button>
</div>
<div class="button-row">
<button id="audio-button" type="button">Audio</button>
<button id="text-button" type="button">Text</button>
</div>
</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 />
Last stream event: <label id="stream-event-label"></label><br />
Streaming status: <label id="streaming-status-label"></label><br />
</div>
</div>
<script type="module" src="./streaming-client-api.js"></script>
</body>
</html>