-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
316 lines (263 loc) · 13.6 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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Custmeet</title>
<link rel="stylesheet" href="css/style.css">
<!--<link rel="stylesheet" href="css/loading.css">-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="AgoraWebSDK/style.css">
<link rel="stylesheet" href="TemplateData/ReadyPlayerMe/RpmStyle.css"><!-- Required for RPM Web Creator -->
<style>
body {
background-color: #ffffff;
background-image: url('img/onboardingBackground.png');
background-repeat: no-repeat;
background-attachment: fixed;
background-size: 100% 100%;
}
</style>
<script>
function SetPermissionEvents() {
navigator.permissions.query({ name: 'microphone' }).then((result) => {
result.onchange = () => {
PermissionCheck();
}
});
navigator.permissions.query({ name: 'camera' }).then((result) => {
result.onchange = () => {
PermissionCheck();
}
});
}
function PermissionCheck() {
console.log("Permission Check");
var joinButton = document.getElementById("pass");
navigator.permissions.query({ name: 'microphone' }).then((result) => {
if (result.state === 'granted') {
joinButton.disabled = false;
joinButton.className = "centeredButton eighteenregular";
}
else {
joinButton.disabled = true;
joinButton.className = "centeredButton2 eighteenregular";
}
});
}
</script>
</head>
<body onload="PermissionCheck()" style="margin: 0px;">
<script src="Build/testWebgl.loader.js"></script>
<script src="index.js"></script>
<script src="js/select.js"></script>
<script src="js/main.js"></script>
<script src="js/mic.js"></script>
<script src="js/video.js"></script>
<script src="js/toggles.js"></script>
<script src="js/volume.js"></script>
<script src="js/nameinput.js"></script>
<script src="js/browserinteraction.js"></script>
<script src="js/platform.js"></script>
<script src="js/webGLcommunicator.js"></script>
<script src="js/eventhandler.js"></script>
<div id="ChoixScene" style="display: none;">
<img src="img/accueilLogo.png" alt="Logo CustMeet" class="centeredImg">
<p class="centeredText twentyfourextralight">Bienvenue sur CustMeet</p>
<p class="centeredText fifteenextralight">L'application visio-conférence multi-utilisateurs en 3D sur
web</p>
<button id='AppartementButton' onclick="SaveSceneChoice(1)"
class="centeredButton eighteenregular">Appartement</button>
<button id='UsineButton' onclick="SaveSceneChoice(2)" class="centeredButton eighteenregular">Usine</button>
<button id='ExpositionButton' onclick="SaveSceneChoice(3)"
class="centeredButton eighteenregular">Exposition</button>
<img src="img/accueilOmbre.png" alt="Ombre sous le bouton" class="centeredShadow">
</div>
<div id="ChoixDuNom" style="display: block;">
<img src="img/accueilLogo.png" alt="Logo CustMeet" class="centeredImg">
<input id='name' type="text" value="" name="v_name" placeholder="Entrez votre nom"
class="centeredInputField twelveextralight" style="width: 22.5%; margin-top: 20vh"/>
<button id='nameButton' name="lauchvisite" onclick="ValidateName(document.getElementById('name').value)"
class="centeredButton2 eighteenregular">Démarrer une conférence 3D</button>
<img src="img/accueilOmbre.png" alt="Ombre sous le bouton" class="centeredShadow">
</div>
<div id="TestAudioVideo" style="display: none;">
<img src="img/accueilLogo.png" alt="Logo CustMeet" class="centeredImg">
<p class="centeredText2 fifteenextralight">Validez vos paramètres audio et vidéo</p>
<div class="row" style="display: inline-flex;">
<div class="column" style="width: 20vw;"> </div>
<div class="CenterColumn" style="width: 50vw;">
<div class="row" style="display: inline-flex; align-items: center; justify-content: center;">
<div style="display: flex;">
<img id="toggleMicroIcon" src="img/toggleMicroOn.png" class="centeredImgMicrophone">
<label class="switch">
<input type="checkbox" onchange="SwitchMicro()" checked>
<span class="slider round"></span>
</label>
</div>
<select id="selectMicro" onchange="SaveAudioInSessionStorage(this.value)"
class="centeredSelect nineextralight" style="margin-top: 0%;">
<option value="" disabled selected>Sélectionnez un micro</option>
</select>
</div>
<div class="row" style="justify-content: center; display: flex; ">
<div style="display:block; width: 50%;">
<div style="display: flex;">
<img id="toggleVolumeIcon" src="img/toggleVolumeOff.png" class="centeredImgVolume">
<div class="bar" id="volume-visualizer"></div>
</div>
<div style="display: block;">
<p id="micFeedbackParagraph" class="micFeedbackText nineextralight">Votre micro est coupé
</p>
</div>
</div>
</div>
<div class="row" style="display: inline-flex;">
<div class="CenterColumn">
<div class="CameraBox" id="CameraBox">
<img src="img/onboardingWebcam.png" class="centeredImg3" id="autorisationImg">
<p id="autorisation" class="centeredText nineextralight">Votre webcam est désactivée</p>
<video id="vid"></video>
</div>
</div>
</div>
<div class="row"
style="display: inline-flex; align-items: center; justify-content: center; margin-top: 2%;">
<div style="display: flex;">
<img id="toggleWebcamIcon" src="img/toggleWebcamOn.png" class="centeredImgWebcam">
<label class="switch">
<input type="checkbox" onchange="SwitchWebcam()" checked>
<span class="slider round"></span>
</label>
</div>
<select id="selectCamera" onchange="SaveVideoInSessionStorage(this.value)"
class="centeredSelect nineextralight" style="margin-top: 0%;">
<option value="" disabled selected>Sélectionnez une caméra</option>
</select>
</div>
<button id="pass" onclick="ShowAvatarSelection()" class="centeredButton2 eighteenregular"
style="width: auto;">Rejoindre
la
conférence</button>
<img src="img/accueilOmbre.png" alt="Ombre sous le bouton" class="centeredShadow">
</div>
<div class="column" style="width: 20vw;"> </div>
</div>
</div>
<p id="AvatarSelection" class="centeredText twentyfourextralight" style="margin-top: 30vh;">Choisissez votre avatar</p>
<div id="SceneImages" class="row" style="align-items:center;">
<div class="threeColumn" style="width:33%; display: flex;">
<div class="SceneImageChoice" onclick="SelectAvatar(0)">
<img src="img/Avatar1.PNG" width="100%" style="display: block;"/>
<p class="fifteencentered" style="background-color: orangered; color: #ffffff; margin: 0;"></p>
</div>
</div>
<div class="threeColumn" style="width:33%; display: flex;">
<div class="SceneImageChoice" onclick="SelectAvatar(1)">
<img src="img/Avatar2.PNG" width="100%" style="display: block;"/>
<p class="fifteencentered" style="background-color: orangered; color: #ffffff; margin: 0;"></p>
</div>
</div>
<div class="threeColumn" style="width:33%; display: flex;">
<div class="SceneImageChoice" onclick="SelectAvatar(2)">
<img src="img/Avatar3.PNG" width="100%" style="display: block;"/>
<p class="fifteencentered" style="background-color: orangered; color: #ffffff; margin: 0;"></p>
</div>
</div>
<div class="fourthColumn" style="width:33%; display: flex;">
<div class="SceneImageChoice" onclick="SelectRPM()">
<img src="img/RPM.PNG" width="100%" style="display: block;"/>
<p class="fifteencentered" style="background-color: orangered; color: #ffffff; margin: 0;"></p>
</div>
</div>
</div>
<div id="info" style="display: none;"></div>
<!-- Unity Container -->
<div class="webgl-content">
<div id="dimension-info" style="display: none;">
<width>960</width>
<height>600</height>
</div>
</div>
<div id="loadingandunitycontainer" style="display: none; overflow: hidden;
background-image: url('img/onboardingBackground.png');
background-size: 100% 100%;">
<div id="unity-container" style="width:100%; height: 100%;;">
<div id="rpm-container">
<iframe id="rpm-frame" class="rpm-frame" style="width: 100vw; height: 100vh; "></iframe>
</div>
<canvas id="unity-canvas" width=960 height=600
style="width: 100vw; height: 100vh; "></canvas>
</div>
<!--Barre de chargement-->
<div id="customloader" class="customloader" style="grid: flex; justify-content: center; text-align: center;">
<img src="img/loadingLogo.png" class="customLoadingImg">
<p class="customLoadingText fifteenextralight">L'application va démarrer dans un instant</p>
<div class="customprogressbar">
<div id="customfill" class="customfill" style="width: 0%;"></div>
</div>
</div>
</div>
<!-- Required, please do not delete -->
<canvas id="inMem_Canvas" height="450" width="450" style="display: none;"></canvas>
<canvas id="myCanvas" height="450" width="450"
style="position: absolute; left: 1px; top: 500px;display: none; border: 2px solid red"></canvas>
<div style="display: none;">
<div id="client-stats" class="stats"></div>
<div class="row video-group">
<div class="col">
<p id="local-player-name" class="player-name"></p>
<div class="player-with-stats">
<div id="local-player" class="player"></div>
<div id="local-stats" class="stream-stats stats"></div>
</div>
</div>
<div class="w-100"></div>
<div class="col">
<div id="remote-playerlist"></div>
</div>
</div>
</div>
<script type="text/javascript">
function customProgress(unityInstance, progress) {
const fill = document.getElementById("customfill");
fill.style.width = progress * 100 + "%";
if (progress == 1) {
fill.style.width = "100%";
}
}
</script>
<script>
if (/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)) {
// Mobile device style: fill the whole browser client area with the game canvas:
var meta = document.createElement('meta');
meta.name = 'viewport';
meta.content = 'width=device-width, height=device-height, initial-scale=1.0, user-scalable=no, shrink-to-fit=yes';
document.getElementsByTagName('head')[0].appendChild(meta);
}
var myGameInstance = null;
var SceneIndex = 0;
createUnityInstance(document.querySelector("#unity-canvas"), {
dataUrl: "Build/testWebgl.data",
frameworkUrl: "Build/testWebgl.framework.js",
codeUrl: "Build/testWebgl.wasm",
streamingAssetsUrl: "StreamingAssets",
companyName: "Kaïnoo",
productName: "Custmeet",
productVersion: "1.0",
// matchWebGLToCanvasSize: false, // Uncomment this to separately control WebGL canvas render size and DOM element size.
// devicePixelRatio: 1, // Uncomment this to override low DPI rendering on high DPI displays.
}, (progress) => {
customProgress(null, progress)
}).then((unityInstance) => {
myGameInstance = unityInstance;
const container = document.getElementById("unity-container");
container.style.display = "block";
const loader = document.getElementById("customloader");
loader.style.display = "none";
});
</script>
<script src="js/RpmGlobal.js"></script> <!-- Required for RPM Web Creator -->
<script src="js/ReadyPlayerMeFrame.js"></script> <!-- Required for RPM Web Creator -->
</body>
</html>