|
@@ -0,0 +1,573 @@
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+<!DOCTYPE html>
|
|
4
|
+<html lang="en" class="h-full">
|
|
5
|
+<head>
|
|
6
|
+ <meta charset="UTF-8">
|
|
7
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
8
|
+ <title>Nuven - Meeting Room</title>
|
|
9
|
+ <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
10
|
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
11
|
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500&family=Plus+Jakarta+Sans:wght@200;300;400;500&display=swap" rel="stylesheet">
|
|
12
|
+ <script src="https://cdn.tailwindcss.com"></script>
|
|
13
|
+ <script>
|
|
14
|
+ tailwind.config = {
|
|
15
|
+ theme: {
|
|
16
|
+ extend: {
|
|
17
|
+ colors: {
|
|
18
|
+ primary: '#050505',
|
|
19
|
+ secondary: '#eeeeee',
|
|
20
|
+ accent: '#777777',
|
|
21
|
+ highlight: '#ffffff'
|
|
22
|
+ },
|
|
23
|
+ fontFamily: {
|
|
24
|
+ sans: ['Inter', 'system-ui', 'sans-serif'],
|
|
25
|
+ display: ['Plus Jakarta Sans', 'system-ui', 'sans-serif']
|
|
26
|
+ }
|
|
27
|
+ }
|
|
28
|
+ }
|
|
29
|
+ }
|
|
30
|
+ </script>
|
|
31
|
+ <style>
|
|
32
|
+
|
|
33
|
+ .flex.items-center.justify-center.h-full{
|
|
34
|
+ opacity: .5;
|
|
35
|
+ position: absolute;
|
|
36
|
+ display: none;
|
|
37
|
+ pointer-events: none;
|
|
38
|
+ }
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+ body {
|
|
42
|
+ background-color: #050505;
|
|
43
|
+ color: #eeeeee;
|
|
44
|
+ font-family: 'Inter', sans-serif;
|
|
45
|
+ font-weight: 300;
|
|
46
|
+ }
|
|
47
|
+ h1, h2, h3, h4, h5, h6 {
|
|
48
|
+ font-family: 'Plus Jakarta Sans', sans-serif;
|
|
49
|
+ font-weight: 300;
|
|
50
|
+ }
|
|
51
|
+ .font-normal {
|
|
52
|
+ font-weight: 300 !important;
|
|
53
|
+ }
|
|
54
|
+ .font-medium {
|
|
55
|
+ font-weight: 400 !important;
|
|
56
|
+ }
|
|
57
|
+ .font-semibold {
|
|
58
|
+ font-weight: 400 !important;
|
|
59
|
+ }
|
|
60
|
+ .font-bold {
|
|
61
|
+ font-weight: 500 !important;
|
|
62
|
+ }
|
|
63
|
+ </style>
|
|
64
|
+
|
|
65
|
+<script src='https://meet.jit.si/external_api.js'></script>
|
|
66
|
+<style>
|
|
67
|
+ .hide {
|
|
68
|
+ display: none;
|
|
69
|
+ }
|
|
70
|
+</style>
|
|
71
|
+
|
|
72
|
+</head>
|
|
73
|
+<body class="flex h-full flex-col">
|
|
74
|
+
|
|
75
|
+ .vbsrv..
|
|
76
|
+ <div id="meet"></div>
|
|
77
|
+
|
|
78
|
+ <!-- Navigation -->
|
|
79
|
+ <nav class=""><!-- Removed border-b class -->
|
|
80
|
+ <div class="mx-auto max-w-screen-2xl px-6 sm:px-8 lg:px-12"><!-- Increased max width and horizontal padding -->
|
|
81
|
+ <div class="flex h-16 items-center justify-between">
|
|
82
|
+ <div class="flex items-center">
|
|
83
|
+ <a href="/" class="flex-shrink-0">
|
|
84
|
+ <img src="/static/images/rmix_logo.png" alt="RMIX Logo" class="h-9 w-auto">
|
|
85
|
+ </a>
|
|
86
|
+ <div class="ml-10 flex items-baseline space-x-4">
|
|
87
|
+
|
|
88
|
+ <a href="/reservation/" class="text-secondary hover:text-white hover:bg-gray-800 rounded-md px-3 py-2 text-sm font-medium transition-colors">Reservations</a>
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+ <a href="/schedule/" class="text-secondary hover:text-white hover:bg-gray-800 rounded-md px-3 py-2 text-sm font-medium transition-colors">Availability</a>
|
|
95
|
+ <a href="/download/" class ="text-secondary hover:text-white hover:bg-gray-800 rounded-md px-3 py-2 text-sm font-medium transition-colors">Download</a>
|
|
96
|
+
|
|
97
|
+ <a href="/user/profile/" class ="text-secondary hover:text-white hover:bg-gray-800 rounded-md px-3 py-2 text-sm font-medium transition-colors">Profile</a>
|
|
98
|
+ </div>
|
|
99
|
+ </div>
|
|
100
|
+ <div class="flex items-center">
|
|
101
|
+
|
|
102
|
+ <div class="relative ml-3 group">
|
|
103
|
+ <button class="flex items-center text-secondary hover:text-white transition-colors">
|
|
104
|
+ <span class="text-sm font-medium">testt@gmail.com</span>
|
|
105
|
+ </button>
|
|
106
|
+ <div class="hidden group-hover:block absolute right-0 z-50 pt-2">
|
|
107
|
+ <div class="w-48 rounded-md shadow-lg bg-gray-900 ring-1 ring-gray-800 ring-opacity-5">
|
|
108
|
+ <div class="py-1">
|
|
109
|
+ <a href="/user/profile/" class="block px-4 py-2 text-sm text-secondary hover:bg-gray-800 transition-colors">Profile</a>
|
|
110
|
+ <form method="post" action="/logout/">
|
|
111
|
+ <input type="hidden" name="csrfmiddlewaretoken" value="UdLKYtL7qv8G4ZtpjnCydUVqsOCOLfv0bq6GVwOXLJVRh94gnN30DCIX8Ti7aSUh">
|
|
112
|
+ <button type="submit" class="block w-full text-left px-4 py-2 text-sm text-secondary hover:bg-gray-800 transition-colors">Logout</button>
|
|
113
|
+ </form>
|
|
114
|
+ </div>
|
|
115
|
+ </div>
|
|
116
|
+ </div>
|
|
117
|
+ </div>
|
|
118
|
+
|
|
119
|
+ </div>
|
|
120
|
+ </div>
|
|
121
|
+ </div>
|
|
122
|
+ </nav>
|
|
123
|
+
|
|
124
|
+ <!-- Messages/Alerts -->
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+ <!-- Main Content -->
|
|
128
|
+ <main class="flex-1">
|
|
129
|
+ <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-6">
|
|
130
|
+
|
|
131
|
+<div class="space-y-6">
|
|
132
|
+ <!-- Meeting Section -->
|
|
133
|
+ <div class="flex flex-col space-y-6">
|
|
134
|
+ <!-- Meet Container - Full width -->
|
|
135
|
+ <div class="bg-gray-800 rounded-xl overflow-hidden" style="height: 600px;">
|
|
136
|
+ <div id="meet-container" class="w-full h-full"></div>
|
|
137
|
+ </div>
|
|
138
|
+
|
|
139
|
+ <!-- Info sections below the meeting -->
|
|
140
|
+ <div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6">
|
|
141
|
+ <!-- Meeting Information -->
|
|
142
|
+ <div class="bg-gray-800 rounded-xl p-6">
|
|
143
|
+ <h2 class="text-xl font-semibold text-white mb-4">Meeting Details</h2>
|
|
144
|
+ <div class="space-y-3">
|
|
145
|
+ <div>
|
|
146
|
+ <label class="block text-sm font-medium text-gray-400">Reservation ID</label>
|
|
147
|
+ <p class="text-white">156</p>
|
|
148
|
+ </div>
|
|
149
|
+ <div>
|
|
150
|
+ <label class="block text-sm font-medium text-gray-400">Gateway Device</label>
|
|
151
|
+ <p class="text-white">RMIX-1001</p>
|
|
152
|
+ </div>
|
|
153
|
+ <div>
|
|
154
|
+ <label class="block text-sm font-medium text-gray-400">Engineer Device</label>
|
|
155
|
+ <p class="text-white">Jamess-MacBook-Pro.local</p>
|
|
156
|
+ </div>
|
|
157
|
+ <div>
|
|
158
|
+ <label class="block text-sm font-medium text-gray-400">Port Number</label>
|
|
159
|
+ <p class="text-white">Not assigned</p>
|
|
160
|
+ </div>
|
|
161
|
+ <div>
|
|
162
|
+ <label class="block text-sm font-medium text-gray-400">Start Time</label>
|
|
163
|
+ <p class="text-white">March 14, 2025, 9:30 a.m.</p>
|
|
164
|
+ </div>
|
|
165
|
+ <div>
|
|
166
|
+ <label class="block text-sm font-medium text-gray-400">End Time</label>
|
|
167
|
+ <p class="text-white">March 14, 2025, 11:45 a.m.</p>
|
|
168
|
+ </div>
|
|
169
|
+ </div>
|
|
170
|
+ </div>
|
|
171
|
+
|
|
172
|
+ <!-- My Information -->
|
|
173
|
+ <div class="bg-gray-800 rounded-xl p-6">
|
|
174
|
+ <h2 class="text-xl font-semibold text-white mb-4">My Information</h2>
|
|
175
|
+ <div class="space-y-3">
|
|
176
|
+ <div>
|
|
177
|
+ <label class="block text-sm font-medium text-gray-400">Name</label>
|
|
178
|
+ <p class="text-white">c c</p>
|
|
179
|
+ </div>
|
|
180
|
+ <div>
|
|
181
|
+ <label class="block text-sm font-medium text-gray-400">Email</label>
|
|
182
|
+ <p class="text-white">testt@gmail.com</p>
|
|
183
|
+ </div>
|
|
184
|
+ <div>
|
|
185
|
+ <label class="block text-sm font-medium text-gray-400">Phone</label>
|
|
186
|
+ <p class="text-white">(987) 654-5678</p>
|
|
187
|
+ </div>
|
|
188
|
+ <div>
|
|
189
|
+ <label class="block text-sm font-medium text-gray-400">Role</label>
|
|
190
|
+ <p class="text-white">Engineer</p>
|
|
191
|
+ </div>
|
|
192
|
+
|
|
193
|
+ <div>
|
|
194
|
+ <label class="block text-sm font-medium text-gray-400">Engineer Level</label>
|
|
195
|
+ <p class="text-white">Mid</p>
|
|
196
|
+ </div>
|
|
197
|
+ <div>
|
|
198
|
+ <label class="block text-sm font-medium text-gray-400">Rating</label>
|
|
199
|
+ <p class="text-white">Not rated</p>
|
|
200
|
+ </div>
|
|
201
|
+ <div>
|
|
202
|
+ <label class="block text-sm font-medium text-gray-400">Preferred Venue</label>
|
|
203
|
+ <p class="text-white">Conference</p>
|
|
204
|
+ </div>
|
|
205
|
+ <div>
|
|
206
|
+ <label class="block text-sm font-medium text-gray-400">Device Count</label>
|
|
207
|
+ <p class="text-white">3</p>
|
|
208
|
+ </div>
|
|
209
|
+ <div>
|
|
210
|
+ <label class="block text-sm font-medium text-gray-400">Registered Speed</label>
|
|
211
|
+ <p class="text-white">125</p>
|
|
212
|
+ </div>
|
|
213
|
+
|
|
214
|
+ <div class="bg-gray-700 p-4 rounded-lg">
|
|
215
|
+ <div class="flex items-center justify-between">
|
|
216
|
+ <label class="block text-sm font-medium text-gray-400">Internet Speed</label>
|
|
217
|
+ <div class="relative">
|
|
218
|
+ <button id="checkNetworkBtn"
|
|
219
|
+ class="inline-flex items-center px-4 py-2 bg-gray-600 border border-gray-500 rounded-lg shadow-sm text-sm font-medium text-gray-200 hover:bg-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 transition-all">
|
|
220
|
+ <svg class="h-4 w-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
221
|
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.14 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"/>
|
|
222
|
+ </svg>
|
|
223
|
+ Check Speed
|
|
224
|
+ </button>
|
|
225
|
+ <!-- Results popup -->
|
|
226
|
+ <div id="networkResults" class="hidden absolute right-0 mt-2 w-64 bg-gray-800 border border-gray-700 rounded-lg shadow-lg p-4 z-10">
|
|
227
|
+ <div class="loader-content">
|
|
228
|
+ <div class="content text-center text-2xl font-bold text-gray-200">
|
|
229
|
+ <!-- Speed will be displayed here -->
|
|
230
|
+ </div>
|
|
231
|
+ </div>
|
|
232
|
+ <div class="loader hide">
|
|
233
|
+ <svg class="animate-spin h-8 w-8 mx-auto text-indigo-500" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
234
|
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
235
|
+ <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
236
|
+ </svg>
|
|
237
|
+ <p class="mt-2 text-gray-400">Testing Speed...</p>
|
|
238
|
+ </div>
|
|
239
|
+ </div>
|
|
240
|
+ </div>
|
|
241
|
+ </div>
|
|
242
|
+ </div>
|
|
243
|
+ </div>
|
|
244
|
+ </div>
|
|
245
|
+
|
|
246
|
+ <!-- Customer Information -->
|
|
247
|
+ <div class="bg-gray-800 rounded-xl p-6">
|
|
248
|
+ <h2 class="text-xl font-semibold text-white mb-4">Customer Information</h2>
|
|
249
|
+ <div class="space-y-3">
|
|
250
|
+ <div>
|
|
251
|
+ <label class="block text-sm font-medium text-gray-400">Venue Type</label>
|
|
252
|
+ <p class="text-white">Broadcast</p>
|
|
253
|
+ </div>
|
|
254
|
+ <div>
|
|
255
|
+ <label class="block text-sm font-medium text-gray-400">Venue Name</label>
|
|
256
|
+ <p class="text-white">
|
|
257
|
+ Not specified
|
|
258
|
+ </p>
|
|
259
|
+ <div>
|
|
260
|
+ <label class="block text-sm font-medium text-gray-400">Console Name</label>
|
|
261
|
+ <p class="text-white">123</p>
|
|
262
|
+ </div>
|
|
263
|
+ </div>
|
|
264
|
+ </div>
|
|
265
|
+ </div>
|
|
266
|
+ </div>
|
|
267
|
+</div>
|
|
268
|
+
|
|
269
|
+ </div>
|
|
270
|
+ </main>
|
|
271
|
+aAAa
|
|
272
|
+ <!-- Footer -->
|
|
273
|
+ <footer class="border-t border-gray-800 mt-auto">
|
|
274
|
+ <div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-4">
|
|
275
|
+ <p class="text-center text-sm text-gray-400">© 2025 Nuven, Inc. All rights reserved.</p>
|
|
276
|
+ </div>
|
|
277
|
+ </footer>
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+<script>
|
|
282
|
+// const domain = "specplot.com";
|
|
283
|
+// const domain = "fredericktheinsanelygreat.com";
|
|
284
|
+// const domain = "xtr_s0.jfidev.com";
|
|
285
|
+// const domain = "xtr_s1.jfidev.com";
|
|
286
|
+// const domain = 'meet.jit.si';
|
|
287
|
+// const domain = 'vbsrv.videocorners.com';
|
|
288
|
+const domain = 'meet2.epowerstor.com';
|
|
289
|
+// const domain = 'meet2.epowerstor.com';
|
|
290
|
+const options = {
|
|
291
|
+ // roomName: 'JitsiMeetAPIExample',
|
|
292
|
+ // roomName: 'ComplexTunnelsDecorateMerely',
|
|
293
|
+ roomName: 'indx/index.new.e2.html/loc.av/nv_j9_dep.j9_dev.prx_dev.invite_dev.dev_av_io.av_jsync/room1a',
|
|
294
|
+ // roomName: 'indx/index.new.html/loc.av/nv_j9_dep.j9_dev.prx_dev.invite_dev.dev_av_io.av_jsync/room1a',
|
|
295
|
+ // roomName: 'indx/index.new.html/loc.av/nv_j9_dep.j9_dev.prx_dev.invite_dev.dev_av_io.av_jsync/room7/JitsiMeetAPIExample',
|
|
296
|
+ // width: 700,
|
|
297
|
+ // height: 700,
|
|
298
|
+
|
|
299
|
+ width: '100%',
|
|
300
|
+ height: '100%',
|
|
301
|
+
|
|
302
|
+ // parentNode: document.querySelector('#meet')
|
|
303
|
+ parentNode: document.querySelector('#meet-container')
|
|
304
|
+};
|
|
305
|
+const api = new JitsiMeetExternalAPI(domain, options);
|
|
306
|
+</script>
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+<script>
|
|
311
|
+ // window.asic.csacsa.a
|
|
312
|
+// Initialize Meet and format phone number
|
|
313
|
+document.addEventListener('DOMContentLoaded', function() {
|
|
314
|
+ // Format the customer phone number
|
|
315
|
+ console.log("DOMContentLoaded!!!")
|
|
316
|
+ const phoneElement = document.getElementById('customer-phone');
|
|
317
|
+ if (phoneElement) {
|
|
318
|
+ const rawPhone = phoneElement.textContent;
|
|
319
|
+ phoneElement.textContent = formatPhoneNumber(rawPhone);
|
|
320
|
+ }
|
|
321
|
+
|
|
322
|
+ // Get the engineer device UUID and reservation ID
|
|
323
|
+ const gatewayUUID = "HS01C240004P0012999";
|
|
324
|
+ const engineerDeviceUUID = "FXV6106RNJ";
|
|
325
|
+ const reservationID = "156";
|
|
326
|
+ return
|
|
327
|
+
|
|
328
|
+ // Create and open the RMIX link
|
|
329
|
+ if (gatewayUUID) {
|
|
330
|
+ const rmix_link = document.createElement('a');
|
|
331
|
+ rmix_link.href = `rmix://open/admin/uuid?=${gatewayUUID}`;
|
|
332
|
+ // rmix_link.href = `https://videorners.com/ign?=${gatewayUUID}`;
|
|
333
|
+ document.body.appendChild(rmix_link);
|
|
334
|
+ rmix_link.click();
|
|
335
|
+
|
|
336
|
+ // Clean up
|
|
337
|
+ setTimeout(function() {
|
|
338
|
+ document.body.removeChild(rmix_link);
|
|
339
|
+ }, 100);
|
|
340
|
+ }
|
|
341
|
+ // return
|
|
342
|
+
|
|
343
|
+ // Alert user that they have to open X32-EDIT
|
|
344
|
+ // alert('Please open X32-EDIT on your computer to control the mixer.');
|
|
345
|
+
|
|
346
|
+ // Fetch the roomName from the API
|
|
347
|
+ fetchMeetingRoom(engineerDeviceUUID, reservationID);
|
|
348
|
+});
|
|
349
|
+
|
|
350
|
+// Function to format phone number as xxx-xxx-xxxx
|
|
351
|
+function formatPhoneNumber(phone) {
|
|
352
|
+ if (!phone || phone === "Not specified" || phone.length < 10) {
|
|
353
|
+ return phone; // Return as-is if invalid or "Not specified"
|
|
354
|
+ }
|
|
355
|
+ // Extract digits only
|
|
356
|
+ const digits = phone.replace(/\D/g, '');
|
|
357
|
+ if (digits.length >= 10) {
|
|
358
|
+ return `${digits.slice(0, 3)}-${digits.slice(3, 6)}-${digits.slice(6, 10)}`;
|
|
359
|
+ }
|
|
360
|
+ return phone; // Return original if not enough digits
|
|
361
|
+}
|
|
362
|
+
|
|
363
|
+// Function to fetch the meeting room URL
|
|
364
|
+function fetchMeetingRoom(uuid, reservationID) {
|
|
365
|
+ const meetContainer = document.querySelector('#meet-container');
|
|
366
|
+
|
|
367
|
+ // Prepare the request body
|
|
368
|
+ const requestBody = {
|
|
369
|
+ uuid: uuid
|
|
370
|
+ };
|
|
371
|
+
|
|
372
|
+ // Make the API request
|
|
373
|
+ // fetch('/reservation/meet/url/', {
|
|
374
|
+ fetch('https://portal.rmixservice.com/reservation/meet/url/', {
|
|
375
|
+ method: 'POST',
|
|
376
|
+ // headers: {
|
|
377
|
+ // 'Content-Type': 'application/json',
|
|
378
|
+ // 'X-CSRFToken': getCookie('csrftoken') // Get CSRF token from cookies
|
|
379
|
+ // },
|
|
380
|
+ body: JSON.stringify(requestBody)
|
|
381
|
+ })
|
|
382
|
+ .then(response => response.json())
|
|
383
|
+ .then(data => {
|
|
384
|
+ if (data.success) {
|
|
385
|
+ // Initialize Jitsi with the returned roomName
|
|
386
|
+ console.log('Meeting room:', data.reservation_room);
|
|
387
|
+ console.log("jdev",data);
|
|
388
|
+ // Print data type
|
|
389
|
+ console.log(typeof data.reservation_room);
|
|
390
|
+ initializeJitsiMeet(data.reservation_room, meetContainer);
|
|
391
|
+ } else {
|
|
392
|
+ // Display error message if reservation hasn't started
|
|
393
|
+ meetContainer.innerHTML = `
|
|
394
|
+ <div class="flex items-center justify-center h-full">
|
|
395
|
+ <div class="text-center p-8 bg-gray-700 rounded-lg shadow-lg">
|
|
396
|
+ <svg class="w-16 h-16 mx-auto text-yellow-500 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
397
|
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
398
|
+ </svg>
|
|
399
|
+ <h2 class="text-xl font-bold text-white mb-2">Reservation hasn't been started yet</h2>
|
|
400
|
+ <p class="text-gray-300">Please wait for the reservation to begin or contact support if you believe this is an error.</p>
|
|
401
|
+ </div>
|
|
402
|
+ </div>
|
|
403
|
+ `;
|
|
404
|
+ }
|
|
405
|
+ })
|
|
406
|
+ .catch(error => {
|
|
407
|
+ console.error('Error fetching meeting room:', error);
|
|
408
|
+
|
|
409
|
+ meetContainer.innerHTML = `
|
|
410
|
+ <div class="flex items-center justify-center h-full">
|
|
411
|
+ <div class="text-center p-8 bg-gray-700 rounded-lg shadow-lg">
|
|
412
|
+ <svg class="w-16 h-16 mx-auto text-red-500 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
413
|
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
|
|
414
|
+ </svg>
|
|
415
|
+ <h2 class="text-xl font-bold text-white mb-2">Error connecting to meeting</h2>
|
|
416
|
+ <p class="text-gray-300">Unable to initialize the meeting. Please refresh or try again later.</p>
|
|
417
|
+ </div>
|
|
418
|
+ </div>
|
|
419
|
+ `;
|
|
420
|
+ });
|
|
421
|
+}
|
|
422
|
+
|
|
423
|
+// Function to initialize Jitsi Meet
|
|
424
|
+function initializeJitsiMeet(roomName, parentNode) {
|
|
425
|
+ // const domain = 'meet2.epowerstor.com';
|
|
426
|
+ const domain = 'vbsrv.videocorners.com';
|
|
427
|
+ // stringify roomName
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+ const options = {
|
|
431
|
+ roomName: roomName,
|
|
432
|
+ roomName: "indx/index.new.v2a.html/loc.av/nv_j9_dep.j9_dev.prx_dev.invite_dev.dev_av_io.av_jsync/room1a",
|
|
433
|
+ width: '100%',
|
|
434
|
+ height: '100%',
|
|
435
|
+ parentNode: parentNode,
|
|
436
|
+ userInfo: {
|
|
437
|
+ displayName: 'testt@gmail.com'
|
|
438
|
+ },
|
|
439
|
+ configOverwrite: {
|
|
440
|
+ startWithAudioMuted: true,
|
|
441
|
+ startWithVideoMuted: true,
|
|
442
|
+ disableAP: true,
|
|
443
|
+ audioQuality: {
|
|
444
|
+ stereo: true,
|
|
445
|
+ opusMaxAverageBitrate: 510000
|
|
446
|
+ }
|
|
447
|
+ },
|
|
448
|
+ interfaceConfigOverwrite: {
|
|
449
|
+ TOOLBAR_BUTTONS: [
|
|
450
|
+ 'microphone', 'camera', 'closedcaptions', 'desktop', 'fullscreen',
|
|
451
|
+ 'fodeviceselection', 'hangup', 'profile', 'recording',
|
|
452
|
+ 'livestreaming', 'etherpad', 'sharedvideo', 'settings', 'raisehand',
|
|
453
|
+ 'videoquality', 'filmstrip', 'feedback', 'stats', 'shortcuts',
|
|
454
|
+ 'tileview', 'videobackgroundblur', 'download', 'help', 'mute-everyone'
|
|
455
|
+ ],
|
|
456
|
+ }
|
|
457
|
+ };
|
|
458
|
+
|
|
459
|
+ console.log("jdev",domain, options)
|
|
460
|
+ const api = new JitsiMeetExternalAPI(domain, options);
|
|
461
|
+
|
|
462
|
+ // Handle Meet events
|
|
463
|
+ api.addEventListener('readyToClose', function() {
|
|
464
|
+ console.log('Meeting ended');
|
|
465
|
+ setTimeout(() => {
|
|
466
|
+ window.location.href = '/reservations/';
|
|
467
|
+ }, 1000);
|
|
468
|
+ });
|
|
469
|
+ api.addEventListener('participantJoined', function(participant) {
|
|
470
|
+ console.log('Participant joined:', participant);
|
|
471
|
+ });
|
|
472
|
+ api.addEventListener('participantLeft', function(participant) {
|
|
473
|
+ console.log('Participant left:', participant);
|
|
474
|
+ });
|
|
475
|
+}
|
|
476
|
+
|
|
477
|
+// Helper function to get CSRF token from cookies
|
|
478
|
+function getCookie(name) {
|
|
479
|
+ let cookieValue = null;
|
|
480
|
+ if (document.cookie && document.cookie !== '') {
|
|
481
|
+ const cookies = document.cookie.split(';');
|
|
482
|
+ for (let i = 0; i < cookies.length; i++) {
|
|
483
|
+ const cookie = cookies[i].trim();
|
|
484
|
+ if (cookie.substring(0, name.length + 1) === (name + '=')) {
|
|
485
|
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
|
|
486
|
+ break;
|
|
487
|
+ }
|
|
488
|
+ }
|
|
489
|
+ }
|
|
490
|
+ return cookieValue;
|
|
491
|
+}
|
|
492
|
+
|
|
493
|
+// Internet Speed Test
|
|
494
|
+document.getElementById('checkNetworkBtn').addEventListener('click', (e) => {
|
|
495
|
+ const imageLink = 'https://upload.wikimedia.org/wikipedia/commons/3/3e/Tokyo_Sky_Tree_2012.JPG';
|
|
496
|
+ const downloadSize = 8185374;
|
|
497
|
+ let time_start, time_end;
|
|
498
|
+ const downloadSrc = new Image();
|
|
499
|
+ const networkResults = document.getElementById('networkResults');
|
|
500
|
+ const loaderContent = networkResults.querySelector('.loader-content');
|
|
501
|
+ const loader = networkResults.querySelector('.loader');
|
|
502
|
+ const content = networkResults.querySelector('.content');
|
|
503
|
+
|
|
504
|
+ // Show the results popup
|
|
505
|
+ networkResults.classList.remove('hidden');
|
|
506
|
+
|
|
507
|
+ // Show loader, hide content
|
|
508
|
+ content.classList.add('hide');
|
|
509
|
+ loader.classList.remove('hide');
|
|
510
|
+
|
|
511
|
+ // Change button state
|
|
512
|
+ e.target.disabled = true;
|
|
513
|
+ e.target.innerHTML = `
|
|
514
|
+ <svg class="animate-spin h-4 w-4 mr-2" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
515
|
+ <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
|
|
516
|
+ <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
|
|
517
|
+ </svg>
|
|
518
|
+ Testing...
|
|
519
|
+ `;
|
|
520
|
+
|
|
521
|
+ time_start = new Date().getTime();
|
|
522
|
+ const cacheImg = "?nn=" + time_start;
|
|
523
|
+ downloadSrc.src = imageLink + cacheImg;
|
|
524
|
+
|
|
525
|
+ downloadSrc.onload = function() {
|
|
526
|
+ time_end = new Date().getTime();
|
|
527
|
+ const timeDuration = (time_end - time_start) / 1000;
|
|
528
|
+ const loadedBytes = downloadSize * 8;
|
|
529
|
+ const totalSpeed = ((loadedBytes / timeDuration) / 1024 / 1024).toFixed(2);
|
|
530
|
+
|
|
531
|
+ let i = 0;
|
|
532
|
+ const animate = () => {
|
|
533
|
+ if (i < totalSpeed) {
|
|
534
|
+ content.innerHTML = i.toFixed(2) + '<small>Mbps</small>';
|
|
535
|
+ setTimeout(animate, 20);
|
|
536
|
+ i += 1.02;
|
|
537
|
+ } else {
|
|
538
|
+ content.innerHTML = totalSpeed + '<small>Mbps</small>';
|
|
539
|
+ }
|
|
540
|
+ }
|
|
541
|
+
|
|
542
|
+ // Show results
|
|
543
|
+ loader.classList.add('hide');
|
|
544
|
+ content.classList.remove('hide');
|
|
545
|
+ animate();
|
|
546
|
+
|
|
547
|
+ // Reset button
|
|
548
|
+ e.target.disabled = false;
|
|
549
|
+ e.target.innerHTML = `
|
|
550
|
+ <svg class="h-4 w-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
551
|
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.111 16.404a5.5 5.5 0 017.778 0M12 20h.01m-7.08-7.071c3.904-3.905 10.236-3.905 14.14 0M1.394 9.393c5.857-5.857 15.355-5.857 21.213 0"/>
|
|
552
|
+ </svg>
|
|
553
|
+ Check Again
|
|
554
|
+ `;
|
|
555
|
+ }
|
|
556
|
+});
|
|
557
|
+
|
|
558
|
+// Close results when clicking outside
|
|
559
|
+document.addEventListener('click', (event) => {
|
|
560
|
+ const networkResults = document.getElementById('networkResults');
|
|
561
|
+ const checkNetworkBtn = document.getElementById('checkNetworkBtn');
|
|
562
|
+ if (networkResults && checkNetworkBtn && !networkResults.contains(event.target) && !checkNetworkBtn.contains(event.target)) {
|
|
563
|
+ networkResults.classList.add('hidden');
|
|
564
|
+ }
|
|
565
|
+});
|
|
566
|
+</script>
|
|
567
|
+
|
|
568
|
+</body>
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+</html>
|