Add 3 files
Browse files- README.md +7 -5
- index.html +476 -19
- prompts.txt +2 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: zoom
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: green
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,476 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="fr">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>LiveConnect - Plateforme de vidéo conférence</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.video-container {
|
11 |
+
position: relative;
|
12 |
+
padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
|
13 |
+
height: 0;
|
14 |
+
overflow: hidden;
|
15 |
+
}
|
16 |
+
.video-container video {
|
17 |
+
position: absolute;
|
18 |
+
top: 0;
|
19 |
+
left: 0;
|
20 |
+
width: 100%;
|
21 |
+
height: 100%;
|
22 |
+
object-fit: cover;
|
23 |
+
}
|
24 |
+
.participant-grid {
|
25 |
+
display: grid;
|
26 |
+
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
|
27 |
+
gap: 15px;
|
28 |
+
}
|
29 |
+
.participant {
|
30 |
+
position: relative;
|
31 |
+
border-radius: 10px;
|
32 |
+
overflow: hidden;
|
33 |
+
background: #2d3748;
|
34 |
+
}
|
35 |
+
.participant-name {
|
36 |
+
position: absolute;
|
37 |
+
bottom: 10px;
|
38 |
+
left: 10px;
|
39 |
+
background: rgba(0,0,0,0.5);
|
40 |
+
color: white;
|
41 |
+
padding: 2px 8px;
|
42 |
+
border-radius: 4px;
|
43 |
+
font-size: 12px;
|
44 |
+
}
|
45 |
+
.modal {
|
46 |
+
transition: opacity 0.3s ease;
|
47 |
+
}
|
48 |
+
.modal-overlay {
|
49 |
+
background: rgba(0,0,0,0.7);
|
50 |
+
}
|
51 |
+
#localVideo {
|
52 |
+
transform: scaleX(-1); /* Miroir pour la caméra locale */
|
53 |
+
}
|
54 |
+
.chat-messages {
|
55 |
+
height: 300px;
|
56 |
+
overflow-y: auto;
|
57 |
+
}
|
58 |
+
.message {
|
59 |
+
word-wrap: break-word;
|
60 |
+
}
|
61 |
+
</style>
|
62 |
+
</head>
|
63 |
+
<body class="bg-gray-900 text-white">
|
64 |
+
<!-- Page d'accueil -->
|
65 |
+
<div id="homePage" class="min-h-screen flex flex-col items-center justify-center p-4">
|
66 |
+
<div class="text-center mb-12">
|
67 |
+
<h1 class="text-5xl font-bold mb-4 text-blue-400">LiveConnect</h1>
|
68 |
+
<p class="text-xl text-gray-300">Plateforme de vidéo conférence en temps réel</p>
|
69 |
+
</div>
|
70 |
+
|
71 |
+
<div class="w-full max-w-md bg-gray-800 rounded-xl p-8 shadow-2xl">
|
72 |
+
<div class="mb-6">
|
73 |
+
<label for="userName" class="block text-gray-300 mb-2">Votre nom</label>
|
74 |
+
<input type="text" id="userName" placeholder="Entrez votre nom"
|
75 |
+
class="w-full px-4 py-2 rounded-lg bg-gray-700 border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
76 |
+
</div>
|
77 |
+
|
78 |
+
<div class="mb-6">
|
79 |
+
<label for="roomId" class="block text-gray-300 mb-2">ID de la réunion</label>
|
80 |
+
<input type="text" id="roomId" placeholder="12345"
|
81 |
+
class="w-full px-4 py-2 rounded-lg bg-gray-700 border border-gray-600 focus:outline-none focus:ring-2 focus:ring-blue-500">
|
82 |
+
</div>
|
83 |
+
|
84 |
+
<div class="flex flex-col space-y-4">
|
85 |
+
<button id="joinBtn" class="bg-blue-600 hover:bg-blue-700 text-white py-3 px-6 rounded-lg font-medium transition duration-200 flex items-center justify-center">
|
86 |
+
<i class="fas fa-video mr-2"></i> Rejoindre
|
87 |
+
</button>
|
88 |
+
<button id="createBtn" class="bg-green-600 hover:bg-green-700 text-white py-3 px-6 rounded-lg font-medium transition duration-200 flex items-center justify-center">
|
89 |
+
<i class="fas fa-plus mr-2"></i> Créer une réunion
|
90 |
+
</button>
|
91 |
+
</div>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
|
95 |
+
<!-- Page de la réunion -->
|
96 |
+
<div id="meetingPage" class="hidden min-h-screen flex flex-col">
|
97 |
+
<!-- En-tête -->
|
98 |
+
<header class="bg-gray-800 py-4 px-6 flex justify-between items-center border-b border-gray-700">
|
99 |
+
<div class="flex items-center">
|
100 |
+
<h2 class="text-xl font-semibold text-blue-400">LiveConnect</h2>
|
101 |
+
<span id="meetingIdDisplay" class="ml-4 bg-gray-700 px-3 py-1 rounded text-sm"></span>
|
102 |
+
</div>
|
103 |
+
<div class="flex items-center space-x-4">
|
104 |
+
<button id="chatToggleBtn" class="text-gray-300 hover:text-white">
|
105 |
+
<i class="fas fa-comment mr-1"></i> Chat
|
106 |
+
</button>
|
107 |
+
<button id="participantsBtn" class="text-gray-300 hover:text-white">
|
108 |
+
<i class="fas fa-users mr-1"></i> <span id="participantCount">1</span>
|
109 |
+
</button>
|
110 |
+
<button id="shareBtn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-1 rounded">
|
111 |
+
<i class="fas fa-share-alt mr-1"></i> Partager
|
112 |
+
</button>
|
113 |
+
</div>
|
114 |
+
</header>
|
115 |
+
|
116 |
+
<!-- Contenu principal -->
|
117 |
+
<div class="flex flex-1">
|
118 |
+
<!-- Zone vidéo -->
|
119 |
+
<div class="flex-1 p-4">
|
120 |
+
<div id="videoContainer" class="participant-grid">
|
121 |
+
<!-- Les vidéos des participants seront ajoutées ici dynamiquement -->
|
122 |
+
</div>
|
123 |
+
</div>
|
124 |
+
|
125 |
+
<!-- Chat panel (caché par défaut) -->
|
126 |
+
<div id="chatPanel" class="hidden w-80 bg-gray-800 border-l border-gray-700 flex flex-col">
|
127 |
+
<div class="p-4 border-b border-gray-700">
|
128 |
+
<h3 class="font-semibold">Chat de la réunion</h3>
|
129 |
+
</div>
|
130 |
+
<div id="chatMessages" class="chat-messages flex-1 p-4 overflow-y-auto">
|
131 |
+
<!-- Messages de chat -->
|
132 |
+
</div>
|
133 |
+
<div class="p-4 border-t border-gray-700">
|
134 |
+
<div class="flex">
|
135 |
+
<input id="chatInput" type="text" placeholder="Tapez votre message..."
|
136 |
+
class="flex-1 px-4 py-2 rounded-l-lg bg-gray-700 border border-gray-600 focus:outline-none">
|
137 |
+
<button id="sendChatBtn" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-r-lg">
|
138 |
+
<i class="fas fa-paper-plane"></i>
|
139 |
+
</button>
|
140 |
+
</div>
|
141 |
+
</div>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
|
145 |
+
<!-- Contrôles -->
|
146 |
+
<footer class="bg-gray-800 py-3 px-6 border-t border-gray-700">
|
147 |
+
<div class="flex justify-center space-x-8">
|
148 |
+
<button id="micBtn" class="control-btn bg-gray-700 hover:bg-gray-600 text-white p-3 rounded-full">
|
149 |
+
<i class="fas fa-microphone"></i>
|
150 |
+
</button>
|
151 |
+
<button id="cameraBtn" class="control-btn bg-gray-700 hover:bg-gray-600 text-white p-3 rounded-full">
|
152 |
+
<i class="fas fa-video"></i>
|
153 |
+
</button>
|
154 |
+
<button id="screenShareBtn" class="control-btn bg-gray-700 hover:bg-gray-600 text-white p-3 rounded-full">
|
155 |
+
<i class="fas fa-desktop"></i>
|
156 |
+
</button>
|
157 |
+
<button id="leaveBtn" class="control-btn bg-red-600 hover:bg-red-700 text-white px-6 py-3 rounded-full">
|
158 |
+
<i class="fas fa-phone-slash mr-2"></i> Quitter
|
159 |
+
</button>
|
160 |
+
</div>
|
161 |
+
</footer>
|
162 |
+
</div>
|
163 |
+
|
164 |
+
<!-- Modal de partage -->
|
165 |
+
<div id="shareModal" class="modal fixed inset-0 flex items-center justify-center z-50 hidden">
|
166 |
+
<div class="modal-overlay absolute inset-0"></div>
|
167 |
+
<div class="bg-gray-800 rounded-xl z-50 w-full max-w-md mx-4 p-6">
|
168 |
+
<div class="flex justify-between items-center mb-4">
|
169 |
+
<h3 class="text-xl font-semibold">Partager le lien</h3>
|
170 |
+
<button id="closeShareModal" class="text-gray-400 hover:text-white">
|
171 |
+
<i class="fas fa-times"></i>
|
172 |
+
</button>
|
173 |
+
</div>
|
174 |
+
<div class="mb-4">
|
175 |
+
<p class="text-gray-300 mb-2">Copiez ce lien et envoyez-le aux participants :</p>
|
176 |
+
<div class="flex">
|
177 |
+
<input id="shareLink" type="text" readonly
|
178 |
+
class="flex-1 px-4 py-2 rounded-l-lg bg-gray-700 border border-gray-600">
|
179 |
+
<button id="copyLinkBtn" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-r-lg">
|
180 |
+
<i class="fas fa-copy"></i>
|
181 |
+
</button>
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
+
</div>
|
186 |
+
|
187 |
+
<script>
|
188 |
+
// Variables globales
|
189 |
+
let localStream;
|
190 |
+
let meetingId = "12345";
|
191 |
+
let userName = "";
|
192 |
+
let isMicOn = true;
|
193 |
+
let isCameraOn = true;
|
194 |
+
let isChatOpen = false;
|
195 |
+
let participants = [];
|
196 |
+
|
197 |
+
// Éléments DOM
|
198 |
+
const homePage = document.getElementById('homePage');
|
199 |
+
const meetingPage = document.getElementById('meetingPage');
|
200 |
+
const userNameInput = document.getElementById('userName');
|
201 |
+
const roomIdInput = document.getElementById('roomId');
|
202 |
+
const joinBtn = document.getElementById('joinBtn');
|
203 |
+
const createBtn = document.getElementById('createBtn');
|
204 |
+
const meetingIdDisplay = document.getElementById('meetingIdDisplay');
|
205 |
+
const videoContainer = document.getElementById('videoContainer');
|
206 |
+
const micBtn = document.getElementById('micBtn');
|
207 |
+
const cameraBtn = document.getElementById('cameraBtn');
|
208 |
+
const screenShareBtn = document.getElementById('screenShareBtn');
|
209 |
+
const leaveBtn = document.getElementById('leaveBtn');
|
210 |
+
const shareBtn = document.getElementById('shareBtn');
|
211 |
+
const shareModal = document.getElementById('shareModal');
|
212 |
+
const closeShareModal = document.getElementById('closeShareModal');
|
213 |
+
const shareLink = document.getElementById('shareLink');
|
214 |
+
const copyLinkBtn = document.getElementById('copyLinkBtn');
|
215 |
+
const participantCount = document.getElementById('participantCount');
|
216 |
+
const chatPanel = document.getElementById('chatPanel');
|
217 |
+
const chatToggleBtn = document.getElementById('chatToggleBtn');
|
218 |
+
const chatMessages = document.getElementById('chatMessages');
|
219 |
+
const chatInput = document.getElementById('chatInput');
|
220 |
+
const sendChatBtn = document.getElementById('sendChatBtn');
|
221 |
+
|
222 |
+
// Événements
|
223 |
+
joinBtn.addEventListener('click', joinMeeting);
|
224 |
+
createBtn.addEventListener('click', createMeeting);
|
225 |
+
micBtn.addEventListener('click', toggleMic);
|
226 |
+
cameraBtn.addEventListener('click', toggleCamera);
|
227 |
+
screenShareBtn.addEventListener('click', toggleScreenShare);
|
228 |
+
leaveBtn.addEventListener('click', leaveMeeting);
|
229 |
+
shareBtn.addEventListener('click', showShareModal);
|
230 |
+
closeShareModal.addEventListener('click', hideShareModal);
|
231 |
+
copyLinkBtn.addEventListener('click', copyShareLink);
|
232 |
+
chatToggleBtn.addEventListener('click', toggleChat);
|
233 |
+
sendChatBtn.addEventListener('click', sendMessage);
|
234 |
+
chatInput.addEventListener('keypress', function(e) {
|
235 |
+
if (e.key === 'Enter') sendMessage();
|
236 |
+
});
|
237 |
+
|
238 |
+
// Fonctions
|
239 |
+
function joinMeeting() {
|
240 |
+
userName = userNameInput.value.trim();
|
241 |
+
const roomId = roomIdInput.value.trim();
|
242 |
+
|
243 |
+
if (!userName) {
|
244 |
+
alert("Veuillez entrer votre nom");
|
245 |
+
return;
|
246 |
+
}
|
247 |
+
|
248 |
+
if (roomId) {
|
249 |
+
meetingId = roomId;
|
250 |
+
}
|
251 |
+
|
252 |
+
startMeeting();
|
253 |
+
}
|
254 |
+
|
255 |
+
function createMeeting() {
|
256 |
+
userName = userNameInput.value.trim();
|
257 |
+
|
258 |
+
if (!userName) {
|
259 |
+
alert("Veuillez entrer votre nom");
|
260 |
+
return;
|
261 |
+
}
|
262 |
+
|
263 |
+
// Générer un ID de réunion aléatoire si non spécifié
|
264 |
+
if (!roomIdInput.value.trim()) {
|
265 |
+
meetingId = Math.random().toString(36).substring(2, 8).toUpperCase();
|
266 |
+
roomIdInput.value = meetingId;
|
267 |
+
} else {
|
268 |
+
meetingId = roomIdInput.value.trim();
|
269 |
+
}
|
270 |
+
|
271 |
+
startMeeting();
|
272 |
+
}
|
273 |
+
|
274 |
+
async function startMeeting() {
|
275 |
+
try {
|
276 |
+
// Obtenir le flux média (caméra + micro)
|
277 |
+
localStream = await navigator.mediaDevices.getUserMedia({
|
278 |
+
audio: true,
|
279 |
+
video: true
|
280 |
+
});
|
281 |
+
|
282 |
+
// Afficher la page de réunion
|
283 |
+
homePage.classList.add('hidden');
|
284 |
+
meetingPage.classList.remove('hidden');
|
285 |
+
|
286 |
+
// Afficher l'ID de réunion
|
287 |
+
meetingIdDisplay.textContent = `ID: ${meetingId}`;
|
288 |
+
|
289 |
+
// Ajouter la vidéo locale
|
290 |
+
addVideoStream(localStream, userName, true);
|
291 |
+
|
292 |
+
// Simuler des participants (pour la démo)
|
293 |
+
setTimeout(() => {
|
294 |
+
simulateParticipants();
|
295 |
+
}, 2000);
|
296 |
+
|
297 |
+
// Mettre à jour le lien de partage
|
298 |
+
updateShareLink();
|
299 |
+
|
300 |
+
} catch (error) {
|
301 |
+
console.error("Erreur d'accès aux médias:", error);
|
302 |
+
alert("Impossible d'accéder à la caméra ou au microphone. Veuillez vérifier vos permissions.");
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
function addVideoStream(stream, name, isLocal = false) {
|
307 |
+
const participantId = `participant-${Date.now()}`;
|
308 |
+
const participant = {
|
309 |
+
id: participantId,
|
310 |
+
name: name,
|
311 |
+
stream: stream,
|
312 |
+
isLocal: isLocal
|
313 |
+
};
|
314 |
+
|
315 |
+
participants.push(participant);
|
316 |
+
updateParticipantCount();
|
317 |
+
|
318 |
+
const videoElement = document.createElement('video');
|
319 |
+
videoElement.id = participantId;
|
320 |
+
videoElement.srcObject = stream;
|
321 |
+
videoElement.autoplay = true;
|
322 |
+
videoElement.playsInline = true;
|
323 |
+
if (isLocal) {
|
324 |
+
videoElement.muted = true;
|
325 |
+
videoElement.classList.add('local-video');
|
326 |
+
}
|
327 |
+
|
328 |
+
const participantDiv = document.createElement('div');
|
329 |
+
participantDiv.className = 'participant';
|
330 |
+
participantDiv.appendChild(videoElement);
|
331 |
+
|
332 |
+
const nameDiv = document.createElement('div');
|
333 |
+
nameDiv.className = 'participant-name';
|
334 |
+
nameDiv.textContent = name + (isLocal ? ' (Vous)' : '');
|
335 |
+
participantDiv.appendChild(nameDiv);
|
336 |
+
|
337 |
+
videoContainer.appendChild(participantDiv);
|
338 |
+
}
|
339 |
+
|
340 |
+
function toggleMic() {
|
341 |
+
if (localStream) {
|
342 |
+
const audioTracks = localStream.getAudioTracks();
|
343 |
+
audioTracks.forEach(track => {
|
344 |
+
track.enabled = !track.enabled;
|
345 |
+
});
|
346 |
+
|
347 |
+
isMicOn = !isMicOn;
|
348 |
+
micBtn.classList.toggle('bg-red-600', !isMicOn);
|
349 |
+
micBtn.classList.toggle('bg-gray-700', isMicOn);
|
350 |
+
}
|
351 |
+
}
|
352 |
+
|
353 |
+
function toggleCamera() {
|
354 |
+
if (localStream) {
|
355 |
+
const videoTracks = localStream.getVideoTracks();
|
356 |
+
videoTracks.forEach(track => {
|
357 |
+
track.enabled = !track.enabled;
|
358 |
+
});
|
359 |
+
|
360 |
+
isCameraOn = !isCameraOn;
|
361 |
+
cameraBtn.classList.toggle('bg-red-600', !isCameraOn);
|
362 |
+
cameraBtn.classList.toggle('bg-gray-700', isCameraOn);
|
363 |
+
}
|
364 |
+
}
|
365 |
+
|
366 |
+
function toggleScreenShare() {
|
367 |
+
// Simuler le partage d'écran (pour la démo)
|
368 |
+
alert("Fonctionnalité de partage d'écran simulée. En production, vous utiliseriez l'API getDisplayMedia.");
|
369 |
+
}
|
370 |
+
|
371 |
+
function leaveMeeting() {
|
372 |
+
// Arrêter tous les flux média
|
373 |
+
if (localStream) {
|
374 |
+
localStream.getTracks().forEach(track => track.stop());
|
375 |
+
}
|
376 |
+
|
377 |
+
// Retour à la page d'accueil
|
378 |
+
meetingPage.classList.add('hidden');
|
379 |
+
homePage.classList.remove('hidden');
|
380 |
+
|
381 |
+
// Réinitialiser
|
382 |
+
videoContainer.innerHTML = '';
|
383 |
+
participants = [];
|
384 |
+
}
|
385 |
+
|
386 |
+
function showShareModal() {
|
387 |
+
shareModal.classList.remove('hidden');
|
388 |
+
}
|
389 |
+
|
390 |
+
function hideShareModal() {
|
391 |
+
shareModal.classList.add('hidden');
|
392 |
+
}
|
393 |
+
|
394 |
+
function updateShareLink() {
|
395 |
+
const currentUrl = window.location.href.split('?')[0];
|
396 |
+
shareLink.value = `${currentUrl}?room=${meetingId}`;
|
397 |
+
}
|
398 |
+
|
399 |
+
function copyShareLink() {
|
400 |
+
shareLink.select();
|
401 |
+
document.execCommand('copy');
|
402 |
+
alert('Lien copié dans le presse-papiers !');
|
403 |
+
}
|
404 |
+
|
405 |
+
function updateParticipantCount() {
|
406 |
+
participantCount.textContent = participants.length;
|
407 |
+
}
|
408 |
+
|
409 |
+
function toggleChat() {
|
410 |
+
isChatOpen = !isChatOpen;
|
411 |
+
chatPanel.classList.toggle('hidden', !isChatOpen);
|
412 |
+
}
|
413 |
+
|
414 |
+
function sendMessage() {
|
415 |
+
const message = chatInput.value.trim();
|
416 |
+
if (message && userName) {
|
417 |
+
const messageDiv = document.createElement('div');
|
418 |
+
messageDiv.className = 'message mb-2 p-2 bg-gray-700 rounded';
|
419 |
+
messageDiv.innerHTML = `<strong>${userName}:</strong> ${message}`;
|
420 |
+
chatMessages.appendChild(messageDiv);
|
421 |
+
chatInput.value = '';
|
422 |
+
|
423 |
+
// Faire défiler vers le bas
|
424 |
+
chatMessages.scrollTop = chatMessages.scrollHeight;
|
425 |
+
|
426 |
+
// Simuler une réponse (pour la démo)
|
427 |
+
if (participants.length > 1) {
|
428 |
+
setTimeout(() => {
|
429 |
+
const replyDiv = document.createElement('div');
|
430 |
+
replyDiv.className = 'message mb-2 p-2 bg-blue-900 rounded';
|
431 |
+
replyDiv.innerHTML = `<strong>Participant:</strong> Merci pour votre message!`;
|
432 |
+
chatMessages.appendChild(replyDiv);
|
433 |
+
chatMessages.scrollTop = chatMessages.scrollHeight;
|
434 |
+
}, 1000);
|
435 |
+
}
|
436 |
+
}
|
437 |
+
}
|
438 |
+
|
439 |
+
// Simulation de participants pour la démo
|
440 |
+
function simulateParticipants() {
|
441 |
+
if (participants.length < 4) { // Limite à 4 participants pour la démo
|
442 |
+
const names = ["Alex", "Sophie", "Thomas", "Emma", "Lucas", "Camille"];
|
443 |
+
const randomName = names[Math.floor(Math.random() * names.length)];
|
444 |
+
|
445 |
+
// Simuler un nouveau participant
|
446 |
+
navigator.mediaDevices.getUserMedia({ video: true, audio: true })
|
447 |
+
.then(stream => {
|
448 |
+
addVideoStream(stream, randomName);
|
449 |
+
})
|
450 |
+
.catch(() => {
|
451 |
+
// Si l'accès est refusé, simuler quand même avec une vidéo noire
|
452 |
+
const blackVideo = document.createElement('video');
|
453 |
+
blackVideo.autoplay = true;
|
454 |
+
blackVideo.playsInline = true;
|
455 |
+
addVideoStream(blackVideo.captureStream(), randomName);
|
456 |
+
});
|
457 |
+
|
458 |
+
// Simuler un autre participant après un délai
|
459 |
+
if (participants.length < 3) {
|
460 |
+
setTimeout(simulateParticipants, 3000);
|
461 |
+
}
|
462 |
+
}
|
463 |
+
}
|
464 |
+
|
465 |
+
// Vérifier s'il y a un ID de réunion dans l'URL
|
466 |
+
window.addEventListener('DOMContentLoaded', () => {
|
467 |
+
const urlParams = new URLSearchParams(window.location.search);
|
468 |
+
const roomParam = urlParams.get('room');
|
469 |
+
|
470 |
+
if (roomParam) {
|
471 |
+
roomIdInput.value = roomParam;
|
472 |
+
}
|
473 |
+
});
|
474 |
+
</script>
|
475 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Adamchab/zoom" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
476 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
Fait moi une plateforme en html pour du live vidéo fonctionnel avec possibilité denvo8le lien afin que la personne puisse nous rejoindre dans le live comme l'application zoom
|
2 |
+
Id est 12345 et les boutons doivent être fonctionnel m'envoyer sur une page où ont peut discuter en live video
|