-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
191 lines (177 loc) · 7.03 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" viewport-fit="cover" />
<title>Peek-A-Boo Conf Call</title>
<link rel="manifest" href="/manifest.json">
<link rel="apple-touch-icon" href="/images/logo.png">
<link
rel="icon"
type="image/png"
sizes="32x32"
href="/images/logo.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="/images/logo.png"
/>
<!-- app styles -->
<link rel="stylesheet" href="/styles/index.css" />
</head>
<body>
<div id="main">
<!-- LOGIN SCREEN -->
<section id="login">
<div id="login-logo">
<img id="login-image" src="/images/logo.png" alt="Peek-A-Boo" />
<div id="login-caption" style="font-size: 50px;">Peek-A-Boo</div>
<div id="login-caption">Conference calling</div>
<div id="login-loader" class="hidden">
<div id="login-loader-text">Connecting...</div>
<div id="login-loader-spinner">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
style="margin: auto; background: none; display: block; shape-rendering: auto;"
width="20px"
height="20px"
viewBox="0 0 100 100"
preserveAspectRatio="xMidYMid"
>
<circle
r="36"
cx="50"
cy="50"
fill="none"
stroke="#1198d4"
stroke-width="10"
stroke-dasharray="169.64600329384882 58.548667764616276"
transform="rotate(113.674 50 50)"
>
<animateTransform
attributeName="transform"
type="rotate"
repeatCount="indefinite"
dur="1s"
values="0 50 50;360 50 50"
keyTimes="0;1"
></animateTransform>
</circle>
</svg>
</div>
</div>
</div>
<div id="login-buttons-container"></div>
</section>
<!-- START VIDEOCHAT SCREEN -->
<section id="call" class="hidden">
<div id="call-select-users"></div>
<div id="call-buttons-container">
<button id="call-start" class="call-button"></button>
</div>
<div id="call-icoming"></div>
<div id="call-modal-icoming" tabindex="-1">
<div class="call-modal-header">Incoming call from <strong id="call-modal-initiator"></strong></div>
<div class="call-modal-footer">
<button id="call-modal-reject" class="call-modal-button" type="button">Reject</button>
<button id="call-modal-accept" class="call-modal-button" type="button">Accept</button>
</div>
</div>
</section>
<!-- ACTIVE VIDEOCHAT SCREEN -->
<section id="videochat" class="hidden">
<div id="videochat-streams"></div>
<div id="videochat-buttons-container">
<button id="videochat-mute-unmute" class="videochat-button" disabled></button>
<button id="videochat-mute-unmute-video" class="videochat-button" disabled></button>
<button id="videochat-stop-call" class="videochat-button"></button>
<button id="videochat-switch-camera" class="videochat-button" disabled></button>
</div>
</section>
<!-- SNACKBAR -->
<div id="snackbar"></div>
<!-- HANDLEBARS TEMPLATES -->
<script type="text/x-handlebars-template" id="login-buttons-template">
{{#if drawUsers}}
{{#each users}}
<button class="login-button {{this.name}}-bg-color" data-id="{{this.id}}">Login as {{this.name}}</button>
{{/each}}
{{/if}}
<div align="center">
{{#if drawJoinGuestRoomButton}}
<h2 class="guest-title">Or create and join</h2>
<button id="guest-room-join-btn" class="login-button">{{guestButtonText}}</button>
{{/if}}
</div>
</script>
<script type="text/x-handlebars-template" id="select-users-template">
<h2 id="select-header">Select users to start Videocall</h2>
{{#each usersForSelect}}
<label for="select-{{this.id}}" id="select-{{this.name}}" class="{{this.name}}-bg-color select-user">
<span>{{this.name}}</span>
<input type="checkbox" id="select-{{this.id}}" class="select-user-checkbox" data-id="{{this.id}}" />
</label>
{{/each}}
</script>
<script type="text/x-handlebars-template" id="videochat-streams-template">
<div class="videochat-stream-loader" data-id="{{id}}">
<div class="videochat-stream-loader-text">{{name}} </div>
<div class="videochat-stream-loader-spinner">
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
style="margin: auto; background: none; display: block; shape-rendering: auto;"
width="20px"
height="20px"
viewBox="0 0 100 100"
preserveAspectRatio="xMidYMid"
>
<circle
r="36"
cx="50"
cy="50"
fill="none"
stroke="#1198d4"
stroke-width="10"
stroke-dasharray="169.64600329384882 58.548667764616276"
transform="rotate(113.674 50 50)"
>
<animateTransform
attributeName="transform"
type="rotate"
repeatCount="indefinite"
dur="1s"
values="0 50 50;360 50 50"
keyTimes="0;1"
></animateTransform>
</circle>
</svg>
</div>
</div>
<div data-id="{{id}}" class="user-placeholder">
<div class="user-image"></div>
</div>
<video playsinline id="stream-{{id}}" class="videochat-stream"></video>
<div data-id="{{id}}" class="display-user-name">
<p class="user-name">{{name}}</p>
</div>
</script>
<!-- SOUNDS -->
<audio id="signal-end" preload="auto">
<source src="/audio/end_call.mp3" type="audio/mp3" />
</audio>
<audio id="signal-out" loop preload="auto">
<source src="/audio/dialing.mp3" type="audio/mp3" />
</audio>
<audio id="signal-in" loop preload="auto">
<source src="/audio/calling.mp3" type="audio/mp3" />
</audio>
</div>
</body>
<script type="text/javascript" src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/connectycube@3.0.6/dist/connectycube.min.js"></script>
<script type="text/javascript" src="./dist/main.js"></script>
</html>