Spaces:
Running
Running
Add 3 files
Browse files- README.md +6 -4
- index.html +984 -19
- prompts.txt +2 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: pink
|
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: cinestream-ia
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: yellow
|
5 |
colorTo: pink
|
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,984 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>CineStream - Streaming Automatique</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 |
+
<script>
|
10 |
+
tailwind.config = {
|
11 |
+
theme: {
|
12 |
+
extend: {
|
13 |
+
colors: {
|
14 |
+
primary: '#6d28d9',
|
15 |
+
secondary: '#8b5cf6',
|
16 |
+
dark: '#1e1b4b',
|
17 |
+
light: '#f5f3ff',
|
18 |
+
},
|
19 |
+
fontFamily: {
|
20 |
+
sans: ['Inter', 'sans-serif'],
|
21 |
+
},
|
22 |
+
}
|
23 |
+
}
|
24 |
+
}
|
25 |
+
</script>
|
26 |
+
<style>
|
27 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
28 |
+
|
29 |
+
body {
|
30 |
+
font-family: 'Inter', sans-serif;
|
31 |
+
background-color: #0f172a;
|
32 |
+
color: white;
|
33 |
+
}
|
34 |
+
|
35 |
+
.movie-card {
|
36 |
+
transition: all 0.3s ease;
|
37 |
+
}
|
38 |
+
|
39 |
+
.movie-card:hover {
|
40 |
+
transform: translateY(-10px);
|
41 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
42 |
+
}
|
43 |
+
|
44 |
+
.movie-poster {
|
45 |
+
height: 450px;
|
46 |
+
object-fit: cover;
|
47 |
+
}
|
48 |
+
|
49 |
+
.loading-spinner {
|
50 |
+
animation: spin 1s linear infinite;
|
51 |
+
}
|
52 |
+
|
53 |
+
@keyframes spin {
|
54 |
+
0% { transform: rotate(0deg); }
|
55 |
+
100% { transform: rotate(360deg); }
|
56 |
+
}
|
57 |
+
|
58 |
+
.gradient-text {
|
59 |
+
background: linear-gradient(90deg, #8b5cf6, #ec4899);
|
60 |
+
-webkit-background-clip: text;
|
61 |
+
background-clip: text;
|
62 |
+
color: transparent;
|
63 |
+
}
|
64 |
+
|
65 |
+
.search-input:focus {
|
66 |
+
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.5);
|
67 |
+
}
|
68 |
+
|
69 |
+
.error-message {
|
70 |
+
background-color: rgba(239, 68, 68, 0.2);
|
71 |
+
border-left: 4px solid #ef4444;
|
72 |
+
}
|
73 |
+
|
74 |
+
.placeholder-poster {
|
75 |
+
background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
|
76 |
+
display: flex;
|
77 |
+
align-items: center;
|
78 |
+
justify-content: center;
|
79 |
+
}
|
80 |
+
|
81 |
+
/* Style pour le lecteur vidéo */
|
82 |
+
.video-container {
|
83 |
+
position: relative;
|
84 |
+
padding-bottom: 56.25%; /* 16:9 */
|
85 |
+
height: 0;
|
86 |
+
overflow: hidden;
|
87 |
+
}
|
88 |
+
|
89 |
+
.video-container iframe {
|
90 |
+
position: absolute;
|
91 |
+
top: 0;
|
92 |
+
left: 0;
|
93 |
+
width: 100%;
|
94 |
+
height: 100%;
|
95 |
+
border: none;
|
96 |
+
}
|
97 |
+
|
98 |
+
/* Style pour les boutons de streaming */
|
99 |
+
.stream-btn {
|
100 |
+
transition: all 0.2s ease;
|
101 |
+
}
|
102 |
+
|
103 |
+
.stream-btn:hover {
|
104 |
+
transform: scale(1.05);
|
105 |
+
}
|
106 |
+
|
107 |
+
/* Style pour la fenêtre de streaming */
|
108 |
+
.streaming-window {
|
109 |
+
position: fixed;
|
110 |
+
top: 0;
|
111 |
+
left: 0;
|
112 |
+
width: 100%;
|
113 |
+
height: 100%;
|
114 |
+
background-color: rgba(0, 0, 0, 0.9);
|
115 |
+
z-index: 1000;
|
116 |
+
display: flex;
|
117 |
+
flex-direction: column;
|
118 |
+
}
|
119 |
+
|
120 |
+
.streaming-header {
|
121 |
+
padding: 15px;
|
122 |
+
background-color: rgba(0, 0, 0, 0.7);
|
123 |
+
display: flex;
|
124 |
+
justify-content: space-between;
|
125 |
+
align-items: center;
|
126 |
+
}
|
127 |
+
|
128 |
+
.streaming-content {
|
129 |
+
flex: 1;
|
130 |
+
display: flex;
|
131 |
+
justify-content: center;
|
132 |
+
align-items: center;
|
133 |
+
}
|
134 |
+
|
135 |
+
.streaming-controls {
|
136 |
+
padding: 15px;
|
137 |
+
background-color: rgba(0, 0, 0, 0.7);
|
138 |
+
display: flex;
|
139 |
+
justify-content: space-between;
|
140 |
+
align-items: center;
|
141 |
+
}
|
142 |
+
|
143 |
+
/* Style pour la sélection de serveur */
|
144 |
+
.server-list {
|
145 |
+
display: flex;
|
146 |
+
gap: 10px;
|
147 |
+
flex-wrap: wrap;
|
148 |
+
margin-top: 10px;
|
149 |
+
}
|
150 |
+
|
151 |
+
.server-btn {
|
152 |
+
padding: 8px 12px;
|
153 |
+
border-radius: 20px;
|
154 |
+
font-size: 14px;
|
155 |
+
cursor: pointer;
|
156 |
+
transition: all 0.2s;
|
157 |
+
}
|
158 |
+
|
159 |
+
.server-btn.active {
|
160 |
+
background-color: #6d28d9;
|
161 |
+
color: white;
|
162 |
+
}
|
163 |
+
|
164 |
+
.server-btn.inactive {
|
165 |
+
background-color: #334155;
|
166 |
+
color: #94a3b8;
|
167 |
+
}
|
168 |
+
|
169 |
+
/* Animation de chargement du streaming */
|
170 |
+
.stream-loading {
|
171 |
+
display: flex;
|
172 |
+
flex-direction: column;
|
173 |
+
align-items: center;
|
174 |
+
justify-content: center;
|
175 |
+
gap: 20px;
|
176 |
+
}
|
177 |
+
|
178 |
+
.stream-loading-spinner {
|
179 |
+
width: 50px;
|
180 |
+
height: 50px;
|
181 |
+
border: 5px solid rgba(255, 255, 255, 0.1);
|
182 |
+
border-radius: 50%;
|
183 |
+
border-top-color: #6d28d9;
|
184 |
+
animation: spin 1s linear infinite;
|
185 |
+
}
|
186 |
+
|
187 |
+
/* Nouveaux styles pour les serveurs automatiques */
|
188 |
+
.auto-server-badge {
|
189 |
+
position: absolute;
|
190 |
+
top: 10px;
|
191 |
+
right: 10px;
|
192 |
+
background-color: rgba(109, 40, 217, 0.9);
|
193 |
+
color: white;
|
194 |
+
padding: 4px 8px;
|
195 |
+
border-radius: 4px;
|
196 |
+
font-size: 12px;
|
197 |
+
font-weight: bold;
|
198 |
+
z-index: 10;
|
199 |
+
}
|
200 |
+
|
201 |
+
.server-quality {
|
202 |
+
font-size: 12px;
|
203 |
+
margin-left: 5px;
|
204 |
+
opacity: 0.8;
|
205 |
+
}
|
206 |
+
</style>
|
207 |
+
</head>
|
208 |
+
<body class="min-h-screen">
|
209 |
+
<!-- Navigation -->
|
210 |
+
<nav class="bg-gray-900 bg-opacity-90 backdrop-blur-md fixed w-full z-50 shadow-lg">
|
211 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
212 |
+
<div class="flex items-center justify-between h-16">
|
213 |
+
<div class="flex items-center">
|
214 |
+
<div class="flex-shrink-0">
|
215 |
+
<span class="text-2xl font-bold gradient-text">CineStream</span>
|
216 |
+
</div>
|
217 |
+
<div class="hidden md:block ml-10">
|
218 |
+
<div class="flex space-x-4">
|
219 |
+
<a href="#" class="text-white px-3 py-2 rounded-md text-sm font-medium bg-primary">Accueil</a>
|
220 |
+
<a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Films</a>
|
221 |
+
<a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Séries</a>
|
222 |
+
<a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Tendances</a>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
</div>
|
226 |
+
<div class="hidden md:block">
|
227 |
+
<div class="ml-4 flex items-center md:ml-6">
|
228 |
+
<div class="relative mx-4">
|
229 |
+
<input type="text" id="search-input" placeholder="Rechercher un film..."
|
230 |
+
class="search-input bg-gray-800 text-white px-4 py-2 rounded-full w-64 focus:outline-none focus:ring-2 focus:ring-purple-500 transition duration-200">
|
231 |
+
<button onclick="searchMovies()" class="absolute right-3 top-2 text-gray-400 hover:text-white">
|
232 |
+
<i class="fas fa-search"></i>
|
233 |
+
</button>
|
234 |
+
</div>
|
235 |
+
<button class="p-1 rounded-full text-gray-400 hover:text-white focus:outline-none">
|
236 |
+
<i class="fas fa-user-circle text-xl"></i>
|
237 |
+
</button>
|
238 |
+
</div>
|
239 |
+
</div>
|
240 |
+
<div class="-mr-2 flex md:hidden">
|
241 |
+
<button class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none">
|
242 |
+
<i class="fas fa-bars"></i>
|
243 |
+
</button>
|
244 |
+
</div>
|
245 |
+
</div>
|
246 |
+
</div>
|
247 |
+
</nav>
|
248 |
+
|
249 |
+
<!-- Main Content -->
|
250 |
+
<main class="pt-24 pb-12">
|
251 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
252 |
+
<!-- Featured Section -->
|
253 |
+
<section class="mb-12">
|
254 |
+
<div class="flex justify-between items-center mb-6">
|
255 |
+
<h2 class="text-2xl font-bold text-white">Films populaires</h2>
|
256 |
+
<div class="flex space-x-2">
|
257 |
+
<button onclick="filterMovies('popular')" class="px-4 py-1 rounded-full text-sm bg-primary text-white">Populaires</button>
|
258 |
+
<button onclick="filterMovies('top_rated')" class="px-4 py-1 rounded-full text-sm bg-gray-700 text-white">Mieux notés</button>
|
259 |
+
<button onclick="filterMovies('upcoming')" class="px-4 py-1 rounded-full text-sm bg-gray-700 text-white">Prochainement</button>
|
260 |
+
</div>
|
261 |
+
</div>
|
262 |
+
|
263 |
+
<div id="movies-container" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
|
264 |
+
<!-- Movies will be loaded here -->
|
265 |
+
<div class="flex justify-center items-center py-12 col-span-full">
|
266 |
+
<div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary loading-spinner"></div>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
|
270 |
+
<div id="load-more-container" class="mt-8 flex justify-center">
|
271 |
+
<button onclick="loadMoreMovies()" class="px-6 py-2 bg-primary text-white rounded-full hover:bg-secondary transition flex items-center">
|
272 |
+
<span>Voir plus</span>
|
273 |
+
<i class="fas fa-chevron-down ml-2"></i>
|
274 |
+
</button>
|
275 |
+
</div>
|
276 |
+
</section>
|
277 |
+
|
278 |
+
<!-- Genres Section -->
|
279 |
+
<section class="mb-12">
|
280 |
+
<h2 class="text-2xl font-bold text-white mb-6">Par genres</h2>
|
281 |
+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4">
|
282 |
+
<button onclick="filterByGenre(28)" class="genre-btn px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded-full text-sm">Action</button>
|
283 |
+
<button onclick="filterByGenre(12)" class="genre-btn px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-full text-sm">Aventure</button>
|
284 |
+
<button onclick="filterByGenre(16)" class="genre-btn px-4 py-2 bg-green-600 hover:bg-green-700 text-white rounded-full text-sm">Animation</button>
|
285 |
+
<button onclick="filterByGenre(35)" class="genre-btn px-4 py-2 bg-yellow-600 hover:bg-yellow-700 text-white rounded-full text-sm">Comédie</button>
|
286 |
+
<button onclick="filterByGenre(80)" class="genre-btn px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white rounded-full text-sm">Crime</button>
|
287 |
+
<button onclick="filterByGenre(18)" class="genre-btn px-4 py-2 bg-purple-600 hover:bg-purple-700 text-white rounded-full text-sm">Drame</button>
|
288 |
+
</div>
|
289 |
+
</section>
|
290 |
+
</div>
|
291 |
+
</main>
|
292 |
+
|
293 |
+
<!-- Footer -->
|
294 |
+
<footer class="bg-gray-900 text-gray-400 py-8">
|
295 |
+
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
296 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
297 |
+
<div>
|
298 |
+
<h3 class="text-white text-lg font-semibold mb-4">CineStream</h3>
|
299 |
+
<p class="text-sm">La meilleure plateforme pour regarder des films avec streaming automatique.</p>
|
300 |
+
</div>
|
301 |
+
<div>
|
302 |
+
<h3 class="text-white text-lg font-semibold mb-4">Navigation</h3>
|
303 |
+
<ul class="space-y-2 text-sm">
|
304 |
+
<li><a href="#" class="hover:text-white">Accueil</a></li>
|
305 |
+
<li><a href="#" class="hover:text-white">Films</a></li>
|
306 |
+
<li><a href="#" class="hover:text-white">Séries</a></li>
|
307 |
+
<li><a href="#" class="hover:text-white">Nouveautés</a></li>
|
308 |
+
</ul>
|
309 |
+
</div>
|
310 |
+
<div>
|
311 |
+
<h3 class="text-white text-lg font-semibold mb-4">Légal</h3>
|
312 |
+
<ul class="space-y-2 text-sm">
|
313 |
+
<li><a href="#" class="hover:text-white">Conditions d'utilisation</a></li>
|
314 |
+
<li><a href="#" class="hover:text-white">Politique de confidentialité</a></li>
|
315 |
+
<li><a href="#" class="hover:text-white">DMCA</a></li>
|
316 |
+
</ul>
|
317 |
+
</div>
|
318 |
+
<div>
|
319 |
+
<h3 class="text-white text-lg font-semibold mb-4">Contact</h3>
|
320 |
+
<div class="flex space-x-4">
|
321 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-facebook-f"></i></a>
|
322 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
|
323 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-instagram"></i></a>
|
324 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a>
|
325 |
+
</div>
|
326 |
+
</div>
|
327 |
+
</div>
|
328 |
+
<div class="border-t border-gray-800 mt-8 pt-8 text-sm text-center">
|
329 |
+
<p>© 2023 CineStream. Tous droits réservés.</p>
|
330 |
+
</div>
|
331 |
+
</div>
|
332 |
+
</footer>
|
333 |
+
|
334 |
+
<!-- Movie Details Modal -->
|
335 |
+
<div id="movie-modal" class="fixed inset-0 z-50 hidden overflow-y-auto">
|
336 |
+
<div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
|
337 |
+
<div class="fixed inset-0 transition-opacity" aria-hidden="true">
|
338 |
+
<div class="absolute inset-0 bg-gray-900 opacity-75"></div>
|
339 |
+
</div>
|
340 |
+
<span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span>
|
341 |
+
<div class="inline-block align-bottom bg-gray-800 rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-4xl sm:w-full">
|
342 |
+
<div class="px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
|
343 |
+
<div class="sm:flex sm:items-start">
|
344 |
+
<div id="modal-poster" class="flex-shrink-0 w-full sm:w-1/3 mb-4 sm:mb-0 sm:mr-6">
|
345 |
+
<img class="w-full rounded-lg shadow-lg" src="" alt="Movie Poster">
|
346 |
+
</div>
|
347 |
+
<div class="mt-3 text-center sm:mt-0 sm:text-left w-full sm:w-2/3">
|
348 |
+
<h3 id="modal-title" class="text-2xl leading-6 font-bold text-white mb-2"></h3>
|
349 |
+
<div class="flex items-center mb-4">
|
350 |
+
<span id="modal-rating" class="bg-yellow-500 text-white text-xs font-semibold px-2 py-1 rounded mr-3"></span>
|
351 |
+
<span id="modal-year" class="text-gray-300 text-sm"></span>
|
352 |
+
<span id="modal-runtime" class="ml-3 text-gray-300 text-sm"></span>
|
353 |
+
</div>
|
354 |
+
<p id="modal-overview" class="text-gray-300 mb-4"></p>
|
355 |
+
<div id="modal-genres" class="flex flex-wrap gap-2 mb-4"></div>
|
356 |
+
|
357 |
+
<!-- Serveurs de streaming -->
|
358 |
+
<div class="mb-4">
|
359 |
+
<h4 class="text-sm font-semibold text-gray-400 mb-2">CHOISIR UN SERVEUR :</h4>
|
360 |
+
<div class="server-list">
|
361 |
+
<button onclick="selectServer('superembed')" class="server-btn active" data-server="superembed">
|
362 |
+
<i class="fas fa-bolt mr-1"></i> SuperEmbed <span class="server-quality">HD</span>
|
363 |
+
</button>
|
364 |
+
<button onclick="selectServer('vidsrc')" class="server-btn inactive" data-server="vidsrc">
|
365 |
+
<i class="fas fa-server mr-1"></i> VidSrc <span class="server-quality">Multi-Q</span>
|
366 |
+
</button>
|
367 |
+
<button onclick="selectServer('2embed')" class="server-btn inactive" data-server="2embed">
|
368 |
+
<i class="fas fa-play-circle mr-1"></i> 2Embed <span class="server-quality">1080p</span>
|
369 |
+
</button>
|
370 |
+
<button onclick="selectServer('databasegdrive')" class="server-btn inactive" data-server="databasegdrive">
|
371 |
+
<i class="fas fa-database mr-1"></i> GDrive <span class="server-quality">4K</span>
|
372 |
+
</button>
|
373 |
+
<button onclick="selectServer('multiembed')" class="server-btn inactive" data-server="multiembed">
|
374 |
+
<i class="fas fa-layer-group mr-1"></i> MultiEmbed <span class="server-quality">HD</span>
|
375 |
+
</button>
|
376 |
+
<button onclick="selectServer('autoembed')" class="server-btn inactive" data-server="autoembed">
|
377 |
+
<i class="fas fa-robot mr-1"></i> AutoEmbed <span class="server-quality">Auto</span>
|
378 |
+
</button>
|
379 |
+
</div>
|
380 |
+
</div>
|
381 |
+
|
382 |
+
<div class="mt-4">
|
383 |
+
<button type="button" onclick="closeModal()" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary text-base font-medium text-white hover:bg-secondary focus:outline-none sm:ml-3 sm:w-auto sm:text-sm">
|
384 |
+
Fermer
|
385 |
+
</button>
|
386 |
+
<button id="watch-now-btn" onclick="startStreaming()" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-green-600 text-base font-medium text-white hover:bg-green-700 focus:outline-none sm:ml-3 sm:w-auto sm:text-sm">
|
387 |
+
<i class="fas fa-play mr-2"></i> Lecture auto
|
388 |
+
</button>
|
389 |
+
</div>
|
390 |
+
</div>
|
391 |
+
</div>
|
392 |
+
</div>
|
393 |
+
</div>
|
394 |
+
</div>
|
395 |
+
</div>
|
396 |
+
|
397 |
+
<!-- Streaming Window (hidden by default) -->
|
398 |
+
<div id="streaming-window" class="streaming-window hidden">
|
399 |
+
<div class="streaming-header">
|
400 |
+
<h3 id="streaming-title" class="text-xl font-bold text-white"></h3>
|
401 |
+
<button onclick="closeStreamingWindow()" class="text-gray-400 hover:text-white">
|
402 |
+
<i class="fas fa-times text-xl"></i>
|
403 |
+
</button>
|
404 |
+
</div>
|
405 |
+
<div class="streaming-content">
|
406 |
+
<div id="streaming-player-container" class="w-full h-full" style="max-width: 1200px;">
|
407 |
+
<!-- Contenu du lecteur sera chargé ici -->
|
408 |
+
<div id="stream-loading" class="stream-loading w-full h-full">
|
409 |
+
<div class="stream-loading-spinner"></div>
|
410 |
+
<p class="text-gray-300">Chargement du flux vidéo...</p>
|
411 |
+
</div>
|
412 |
+
</div>
|
413 |
+
</div>
|
414 |
+
<div class="streaming-controls">
|
415 |
+
<div class="flex space-x-2">
|
416 |
+
<button onclick="changeQuality('720p')" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">720p</button>
|
417 |
+
<button onclick="changeQuality('1080p')" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">1080p</button>
|
418 |
+
<button onclick="changeQuality('4k')" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">4K</button>
|
419 |
+
</div>
|
420 |
+
<div>
|
421 |
+
<button onclick="toggleFullscreen()" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">
|
422 |
+
<i class="fas fa-expand mr-1"></i> Plein écran
|
423 |
+
</button>
|
424 |
+
</div>
|
425 |
+
</div>
|
426 |
+
</div>
|
427 |
+
|
428 |
+
<script>
|
429 |
+
// Configuration
|
430 |
+
const API_KEY = 'c45a857c193f6302f2b5061c3b85e743'; // Clé API TMDB valide
|
431 |
+
const BASE_URL = 'https://api.themoviedb.org/3';
|
432 |
+
|
433 |
+
// Nouveaux serveurs de streaming avec URLs de base fonctionnelles
|
434 |
+
const STREAMING_SERVERS = {
|
435 |
+
superembed: {
|
436 |
+
name: 'SuperEmbed',
|
437 |
+
url: 'https://multiembed.mov/?video_id=',
|
438 |
+
autoPlay: true,
|
439 |
+
requiresTMDB: true,
|
440 |
+
requiresIMDB: false,
|
441 |
+
quality: 'HD'
|
442 |
+
},
|
443 |
+
vidsrc: {
|
444 |
+
name: 'VidSrc',
|
445 |
+
url: 'https://vidsrc.to/embed/movie/',
|
446 |
+
autoPlay: true,
|
447 |
+
requiresTMDB: true,
|
448 |
+
requiresIMDB: false,
|
449 |
+
quality: 'Multi-Q'
|
450 |
+
},
|
451 |
+
'2embed': {
|
452 |
+
name: '2Embed',
|
453 |
+
url: 'https://www.2embed.cc/embed/',
|
454 |
+
autoPlay: true,
|
455 |
+
requiresTMDB: false,
|
456 |
+
requiresIMDB: true,
|
457 |
+
quality: '1080p'
|
458 |
+
},
|
459 |
+
databasegdrive: {
|
460 |
+
name: 'GDrive Player',
|
461 |
+
url: 'https://database.gdriveplayer.us/player.php?tmdb=',
|
462 |
+
autoPlay: true,
|
463 |
+
requiresTMDB: true,
|
464 |
+
requiresIMDB: false,
|
465 |
+
quality: '4K'
|
466 |
+
},
|
467 |
+
multiembed: {
|
468 |
+
name: 'MultiEmbed',
|
469 |
+
url: 'https://embed.smashystream.com/playere.php?tmdb=',
|
470 |
+
autoPlay: true,
|
471 |
+
requiresTMDB: true,
|
472 |
+
requiresIMDB: false,
|
473 |
+
quality: 'HD'
|
474 |
+
},
|
475 |
+
autoembed: {
|
476 |
+
name: 'AutoEmbed',
|
477 |
+
url: 'https://autoembed.to/movie/tmdb/',
|
478 |
+
autoPlay: true,
|
479 |
+
requiresTMDB: true,
|
480 |
+
requiresIMDB: false,
|
481 |
+
quality: 'Auto'
|
482 |
+
}
|
483 |
+
};
|
484 |
+
|
485 |
+
let currentPage = 1;
|
486 |
+
let currentFilter = 'popular';
|
487 |
+
let currentGenre = null;
|
488 |
+
let currentSearch = '';
|
489 |
+
let totalPages = 1;
|
490 |
+
let isLoading = false;
|
491 |
+
let currentMovieId = null;
|
492 |
+
let currentIMDBId = null;
|
493 |
+
let selectedServer = 'superembed';
|
494 |
+
|
495 |
+
// Fonction utilitaire pour faire les requêtes API
|
496 |
+
async function fetchAPI(endpoint, params = {}) {
|
497 |
+
const url = new URL(`${BASE_URL}${endpoint}`);
|
498 |
+
|
499 |
+
// Ajouter les paramètres par défaut
|
500 |
+
const defaultParams = {
|
501 |
+
language: 'fr-FR',
|
502 |
+
page: currentPage,
|
503 |
+
api_key: API_KEY
|
504 |
+
};
|
505 |
+
|
506 |
+
// Fusionner les paramètres
|
507 |
+
const queryParams = {...defaultParams, ...params};
|
508 |
+
|
509 |
+
// Ajouter les paramètres à l'URL
|
510 |
+
Object.keys(queryParams).forEach(key => {
|
511 |
+
if (queryParams[key] !== undefined && queryParams[key] !== null) {
|
512 |
+
url.searchParams.append(key, queryParams[key]);
|
513 |
+
}
|
514 |
+
});
|
515 |
+
|
516 |
+
try {
|
517 |
+
const response = await fetch(url);
|
518 |
+
|
519 |
+
if (!response.ok) {
|
520 |
+
throw new Error(`Erreur HTTP: ${response.status}`);
|
521 |
+
}
|
522 |
+
|
523 |
+
return await response.json();
|
524 |
+
} catch (error) {
|
525 |
+
console.error('Erreur API:', error);
|
526 |
+
throw error;
|
527 |
+
}
|
528 |
+
}
|
529 |
+
|
530 |
+
// Charger les films au démarrage
|
531 |
+
document.addEventListener('DOMContentLoaded', function() {
|
532 |
+
loadMovies();
|
533 |
+
|
534 |
+
// Écouter la touche Entrée dans la recherche
|
535 |
+
document.getElementById('search-input').addEventListener('keypress', function(e) {
|
536 |
+
if (e.key === 'Enter') {
|
537 |
+
searchMovies();
|
538 |
+
}
|
539 |
+
});
|
540 |
+
});
|
541 |
+
|
542 |
+
// Charger les films
|
543 |
+
async function loadMovies() {
|
544 |
+
if (isLoading) return;
|
545 |
+
|
546 |
+
isLoading = true;
|
547 |
+
showLoadingState();
|
548 |
+
|
549 |
+
try {
|
550 |
+
let data;
|
551 |
+
|
552 |
+
if (currentSearch) {
|
553 |
+
data = await fetchAPI('/search/movie', {
|
554 |
+
query: currentSearch,
|
555 |
+
include_adult: false,
|
556 |
+
page: currentPage
|
557 |
+
});
|
558 |
+
} else if (currentGenre) {
|
559 |
+
data = await fetchAPI('/discover/movie', {
|
560 |
+
include_adult: false,
|
561 |
+
include_video: false,
|
562 |
+
sort_by: 'popularity.desc',
|
563 |
+
with_genres: currentGenre,
|
564 |
+
page: currentPage
|
565 |
+
});
|
566 |
+
} else {
|
567 |
+
data = await fetchAPI(`/movie/${currentFilter}`, {
|
568 |
+
page: currentPage
|
569 |
+
});
|
570 |
+
}
|
571 |
+
|
572 |
+
totalPages = data.total_pages || 1;
|
573 |
+
|
574 |
+
if (currentPage === 1) {
|
575 |
+
document.getElementById('movies-container').innerHTML = '';
|
576 |
+
}
|
577 |
+
|
578 |
+
if (data.results && data.results.length > 0) {
|
579 |
+
displayMovies(data.results);
|
580 |
+
updateLoadMoreButton();
|
581 |
+
} else {
|
582 |
+
showNoResults();
|
583 |
+
}
|
584 |
+
} catch (error) {
|
585 |
+
console.error('Error fetching movies:', error);
|
586 |
+
showErrorState(error.message);
|
587 |
+
} finally {
|
588 |
+
isLoading = false;
|
589 |
+
}
|
590 |
+
}
|
591 |
+
|
592 |
+
// Afficher l'état de chargement
|
593 |
+
function showLoadingState() {
|
594 |
+
const container = document.getElementById('movies-container');
|
595 |
+
container.innerHTML = `
|
596 |
+
<div class="flex justify-center items-center py-12 col-span-full">
|
597 |
+
<div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary loading-spinner"></div>
|
598 |
+
</div>
|
599 |
+
`;
|
600 |
+
}
|
601 |
+
|
602 |
+
// Afficher les films avec boutons de streaming
|
603 |
+
function displayMovies(movies) {
|
604 |
+
const container = document.getElementById('movies-container');
|
605 |
+
|
606 |
+
movies.forEach(movie => {
|
607 |
+
const movieCard = document.createElement('div');
|
608 |
+
movieCard.className = 'movie-card bg-gray-800 rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-all duration-300 relative';
|
609 |
+
|
610 |
+
// Utiliser l'image originale en haute qualité si disponible
|
611 |
+
const posterPath = movie.poster_path
|
612 |
+
? `https://image.tmdb.org/t/p/w500${movie.poster_path}`
|
613 |
+
: 'https://via.placeholder.com/500x750?text=Affiche+non+disponible';
|
614 |
+
|
615 |
+
movieCard.innerHTML = `
|
616 |
+
<div>
|
617 |
+
<div class="movie-poster w-full rounded-t-lg overflow-hidden ${!movie.poster_path ? 'placeholder-poster' : ''}">
|
618 |
+
<img src="${posterPath}"
|
619 |
+
alt="${movie.title || 'Titre inconnu'}"
|
620 |
+
class="w-full h-full object-cover"
|
621 |
+
onerror="this.src='https://via.placeholder.com/500x750?text=Image+non+chargée'; this.classList.add('placeholder-poster')">
|
622 |
+
</div>
|
623 |
+
<div class="p-4">
|
624 |
+
<h3 class="text-lg font-semibold text-white truncate">${movie.title || 'Titre inconnu'}</h3>
|
625 |
+
<div class="flex items-center mt-2">
|
626 |
+
<span class="text-yellow-400 text-sm">
|
627 |
+
<i class="fas fa-star"></i> ${movie.vote_average ? movie.vote_average.toFixed(1) : 'N/A'}
|
628 |
+
</span>
|
629 |
+
<span class="text-gray-400 text-sm ml-auto">${movie.release_date ? movie.release_date.substring(0, 4) : 'N/A'}</span>
|
630 |
+
</div>
|
631 |
+
<div class="mt-3">
|
632 |
+
<button onclick="startAutoStreaming(${movie.id}, '${movie.title || 'Film'}')" class="w-full stream-btn px-3 py-2 bg-green-600 hover:bg-green-700 text-white rounded text-sm">
|
633 |
+
<i class="fas fa-play-circle mr-1"></i> Lecture auto
|
634 |
+
</button>
|
635 |
+
<button onclick="showMovieDetails(${movie.id})" class="w-full mt-2 px-3 py-2 bg-gray-700 hover:bg-gray-600 text-white rounded text-sm">
|
636 |
+
<i class="fas fa-info-circle mr-1"></i> Détails
|
637 |
+
</button>
|
638 |
+
</div>
|
639 |
+
</div>
|
640 |
+
<div class="auto-server-badge">
|
641 |
+
<i class="fas fa-bolt mr-1"></i> AutoPlay
|
642 |
+
</div>
|
643 |
+
</div>
|
644 |
+
`;
|
645 |
+
|
646 |
+
container.appendChild(movieCard);
|
647 |
+
});
|
648 |
+
}
|
649 |
+
|
650 |
+
// Afficher un message d'erreur
|
651 |
+
function showErrorState(errorMessage) {
|
652 |
+
const container = document.getElementById('movies-container');
|
653 |
+
container.innerHTML = `
|
654 |
+
<div class="col-span-full py-6 px-4 error-message rounded-lg">
|
655 |
+
<div class="flex items-center">
|
656 |
+
<i class="fas fa-exclamation-triangle text-red-500 text-xl mr-3"></i>
|
657 |
+
<div>
|
658 |
+
<h3 class="text-lg font-medium text-white">Erreur lors du chargement des films</h3>
|
659 |
+
<p class="text-gray-300 mt-1">${errorMessage || 'Veuillez réessayer plus tard'}</p>
|
660 |
+
<button onclick="retryLoading()" class="mt-3 px-4 py-2 bg-primary text-white rounded-full hover:bg-secondary transition text-sm">
|
661 |
+
<i class="fas fa-sync-alt mr-2"></i> Réessayer
|
662 |
+
</button>
|
663 |
+
</div>
|
664 |
+
</div>
|
665 |
+
</div>
|
666 |
+
`;
|
667 |
+
|
668 |
+
document.getElementById('load-more-container').classList.add('hidden');
|
669 |
+
}
|
670 |
+
|
671 |
+
// Afficher un message quand aucun résultat n'est trouvé
|
672 |
+
function showNoResults() {
|
673 |
+
const container = document.getElementById('movies-container');
|
674 |
+
container.innerHTML = `
|
675 |
+
<div class="col-span-full text-center py-12">
|
676 |
+
<i class="fas fa-film text-4xl text-gray-500 mb-4"></i>
|
677 |
+
<h3 class="text-xl text-white">Aucun film trouvé</h3>
|
678 |
+
<p class="text-gray-400 mt-2">Essayez avec d'autres critères de recherche</p>
|
679 |
+
</div>
|
680 |
+
`;
|
681 |
+
|
682 |
+
document.getElementById('load-more-container').classList.add('hidden');
|
683 |
+
}
|
684 |
+
|
685 |
+
// Réessayer le chargement
|
686 |
+
function retryLoading() {
|
687 |
+
currentPage = 1;
|
688 |
+
loadMovies();
|
689 |
+
}
|
690 |
+
|
691 |
+
// Mettre à jour le bouton "Voir plus"
|
692 |
+
function updateLoadMoreButton() {
|
693 |
+
const loadMoreContainer = document.getElementById('load-more-container');
|
694 |
+
|
695 |
+
if (currentPage >= totalPages) {
|
696 |
+
loadMoreContainer.innerHTML = `
|
697 |
+
<p class="text-gray-400">Vous avez atteint la fin des résultats</p>
|
698 |
+
`;
|
699 |
+
} else {
|
700 |
+
loadMoreContainer.classList.remove('hidden');
|
701 |
+
}
|
702 |
+
}
|
703 |
+
|
704 |
+
// Filtrer les films
|
705 |
+
function filterMovies(filter) {
|
706 |
+
currentFilter = filter;
|
707 |
+
currentGenre = null;
|
708 |
+
currentSearch = '';
|
709 |
+
currentPage = 1;
|
710 |
+
document.getElementById('search-input').value = '';
|
711 |
+
loadMovies();
|
712 |
+
|
713 |
+
// Mettre à jour les boutons actifs
|
714 |
+
document.querySelectorAll('button').forEach(btn => {
|
715 |
+
if (btn.textContent.toLowerCase().includes(filter.replace('_', ' '))) {
|
716 |
+
btn.classList.remove('bg-gray-700');
|
717 |
+
btn.classList.add('bg-primary');
|
718 |
+
} else {
|
719 |
+
btn.classList.remove('bg-primary');
|
720 |
+
btn.classList.add('bg-gray-700');
|
721 |
+
}
|
722 |
+
});
|
723 |
+
}
|
724 |
+
|
725 |
+
// Filtrer par genre
|
726 |
+
function filterByGenre(genreId) {
|
727 |
+
currentGenre = genreId;
|
728 |
+
currentSearch = '';
|
729 |
+
currentPage = 1;
|
730 |
+
document.getElementById('search-input').value = '';
|
731 |
+
loadMovies();
|
732 |
+
|
733 |
+
// Mettre à jour les boutons actifs
|
734 |
+
document.querySelectorAll('.genre-btn').forEach(btn => {
|
735 |
+
btn.classList.remove('bg-primary');
|
736 |
+
if (btn.onclick.toString().includes(genreId.toString())) {
|
737 |
+
btn.classList.add('bg-primary');
|
738 |
+
}
|
739 |
+
});
|
740 |
+
}
|
741 |
+
|
742 |
+
// Rechercher des films
|
743 |
+
function searchMovies() {
|
744 |
+
const query = document.getElementById('search-input').value.trim();
|
745 |
+
if (query) {
|
746 |
+
currentSearch = query;
|
747 |
+
currentGenre = null;
|
748 |
+
currentPage = 1;
|
749 |
+
loadMovies();
|
750 |
+
}
|
751 |
+
}
|
752 |
+
|
753 |
+
// Charger plus de films
|
754 |
+
function loadMoreMovies() {
|
755 |
+
if (currentPage < totalPages) {
|
756 |
+
currentPage++;
|
757 |
+
loadMovies();
|
758 |
+
}
|
759 |
+
}
|
760 |
+
|
761 |
+
// Afficher les détails du film
|
762 |
+
async function showMovieDetails(movieId) {
|
763 |
+
try {
|
764 |
+
const movie = await fetchAPI(`/movie/${movieId}`);
|
765 |
+
currentMovieId = movieId;
|
766 |
+
|
767 |
+
// Récupérer l'ID IMDB si disponible
|
768 |
+
if (movie.imdb_id) {
|
769 |
+
currentIMDBId = movie.imdb_id;
|
770 |
+
} else {
|
771 |
+
// Si l'ID IMDB n'est pas disponible, essayer de le récupérer via l'API
|
772 |
+
const externalIds = await fetchAPI(`/movie/${movieId}/external_ids`);
|
773 |
+
currentIMDBId = externalIds.imdb_id || null;
|
774 |
+
}
|
775 |
+
|
776 |
+
// Remplir la modal
|
777 |
+
const modalPoster = document.querySelector('#modal-poster img');
|
778 |
+
modalPoster.src = movie.poster_path
|
779 |
+
? `https://image.tmdb.org/t/p/w500${movie.poster_path}`
|
780 |
+
: 'https://via.placeholder.com/500x750?text=Affiche+non+disponible';
|
781 |
+
|
782 |
+
modalPoster.onerror = function() {
|
783 |
+
this.src = 'https://via.placeholder.com/500x750?text=Image+non+chargée';
|
784 |
+
};
|
785 |
+
|
786 |
+
document.getElementById('modal-title').textContent = movie.title || 'Titre inconnu';
|
787 |
+
document.getElementById('modal-rating').textContent = `${movie.vote_average ? movie.vote_average.toFixed(1) : 'N/A'}/10`;
|
788 |
+
document.getElementById('modal-year').textContent = movie.release_date ? movie.release_date.substring(0, 4) : 'N/A';
|
789 |
+
document.getElementById('modal-runtime').textContent = movie.runtime ? `${movie.runtime} min` : '';
|
790 |
+
document.getElementById('modal-overview').textContent = movie.overview || 'Aucun synopsis disponible.';
|
791 |
+
|
792 |
+
// Afficher les genres
|
793 |
+
const genresContainer = document.getElementById('modal-genres');
|
794 |
+
genresContainer.innerHTML = '';
|
795 |
+
if (movie.genres && movie.genres.length > 0) {
|
796 |
+
movie.genres.forEach(genre => {
|
797 |
+
const genreBadge = document.createElement('span');
|
798 |
+
genreBadge.className = 'bg-gray-700 text-white text-xs px-2 py-1 rounded';
|
799 |
+
genreBadge.textContent = genre.name;
|
800 |
+
genresContainer.appendChild(genreBadge);
|
801 |
+
});
|
802 |
+
} else {
|
803 |
+
genresContainer.innerHTML = '<span class="text-gray-400 text-sm">Aucun genre spécifié</span>';
|
804 |
+
}
|
805 |
+
|
806 |
+
// Afficher la modal
|
807 |
+
document.getElementById('movie-modal').classList.remove('hidden');
|
808 |
+
} catch (error) {
|
809 |
+
console.error('Error fetching movie details:', error);
|
810 |
+
alert('Erreur lors du chargement des détails du film: ' + (error.message || 'Veuillez réessayer'));
|
811 |
+
}
|
812 |
+
}
|
813 |
+
|
814 |
+
// Fermer la modal de détails
|
815 |
+
function closeModal() {
|
816 |
+
document.getElementById('movie-modal').classList.add('hidden');
|
817 |
+
}
|
818 |
+
|
819 |
+
// Sélectionner un serveur de streaming
|
820 |
+
function selectServer(serverId) {
|
821 |
+
selectedServer = serverId;
|
822 |
+
|
823 |
+
// Mettre à jour l'état des boutons
|
824 |
+
document.querySelectorAll('.server-btn').forEach(btn => {
|
825 |
+
if (btn.dataset.server === serverId) {
|
826 |
+
btn.classList.remove('inactive');
|
827 |
+
btn.classList.add('active');
|
828 |
+
} else {
|
829 |
+
btn.classList.remove('active');
|
830 |
+
btn.classList.add('inactive');
|
831 |
+
}
|
832 |
+
});
|
833 |
+
}
|
834 |
+
|
835 |
+
// Démarrer le streaming depuis la modal
|
836 |
+
function startStreaming() {
|
837 |
+
if (currentMovieId) {
|
838 |
+
const movieTitle = document.getElementById('modal-title').textContent;
|
839 |
+
startAutoStreaming(currentMovieId, movieTitle);
|
840 |
+
closeModal();
|
841 |
+
}
|
842 |
+
}
|
843 |
+
|
844 |
+
// Démarrer le streaming automatique dans une nouvelle fenêtre
|
845 |
+
async function startAutoStreaming(movieId, movieTitle) {
|
846 |
+
currentMovieId = movieId;
|
847 |
+
|
848 |
+
// Afficher la fenêtre de streaming
|
849 |
+
const streamingWindow = document.getElementById('streaming-window');
|
850 |
+
document.getElementById('streaming-title').textContent = movieTitle;
|
851 |
+
|
852 |
+
// Afficher l'état de chargement
|
853 |
+
const playerContainer = document.getElementById('streaming-player-container');
|
854 |
+
playerContainer.innerHTML = `
|
855 |
+
<div id="stream-loading" class="stream-loading w-full h-full">
|
856 |
+
<div class="stream-loading-spinner"></div>
|
857 |
+
<p class="text-gray-300">Chargement du flux vidéo...</p>
|
858 |
+
</div>
|
859 |
+
`;
|
860 |
+
|
861 |
+
// Afficher la fenêtre de streaming
|
862 |
+
streamingWindow.classList.remove('hidden');
|
863 |
+
|
864 |
+
// Récupérer les informations du film pour l'ID IMDB si nécessaire
|
865 |
+
let imdbId = currentIMDBId;
|
866 |
+
if (!imdbId && STREAMING_SERVERS[selectedServer].requiresIMDB) {
|
867 |
+
try {
|
868 |
+
const externalIds = await fetchAPI(`/movie/${movieId}/external_ids`);
|
869 |
+
imdbId = externalIds.imdb_id;
|
870 |
+
if (!imdbId) {
|
871 |
+
throw new Error("ID IMDB non disponible");
|
872 |
+
}
|
873 |
+
} catch (error) {
|
874 |
+
console.error("Erreur lors de la récupération de l'ID IMDB:", error);
|
875 |
+
playerContainer.innerHTML = `
|
876 |
+
<div class="flex flex-col items-center justify-center h-full text-red-400">
|
877 |
+
<i class="fas fa-exclamation-triangle text-4xl mb-4"></i>
|
878 |
+
<p class="text-lg">Impossible de trouver l'ID IMDB pour ce film</p>
|
879 |
+
<p class="text-sm text-gray-400 mt-2">Essayez avec un autre serveur</p>
|
880 |
+
</div>
|
881 |
+
`;
|
882 |
+
return;
|
883 |
+
}
|
884 |
+
}
|
885 |
+
|
886 |
+
// Construire l'URL de streaming en fonction du serveur sélectionné
|
887 |
+
let streamingUrl;
|
888 |
+
const serverConfig = STREAMING_SERVERS[selectedServer];
|
889 |
+
|
890 |
+
if (serverConfig.requiresTMDB) {
|
891 |
+
streamingUrl = serverConfig.url + movieId;
|
892 |
+
} else if (serverConfig.requiresIMDB && imdbId) {
|
893 |
+
streamingUrl = serverConfig.url + imdbId;
|
894 |
+
} else {
|
895 |
+
// Si aucun ID n'est disponible, utiliser TMDB par défaut
|
896 |
+
streamingUrl = serverConfig.url + movieId;
|
897 |
+
}
|
898 |
+
|
899 |
+
// Ajouter le paramètre de lecture automatique si pris en charge
|
900 |
+
if (serverConfig.autoPlay) {
|
901 |
+
streamingUrl += '/auto';
|
902 |
+
}
|
903 |
+
|
904 |
+
// Créer l'iframe pour le lecteur vidéo
|
905 |
+
const iframe = document.createElement('iframe');
|
906 |
+
iframe.id = 'streaming-player';
|
907 |
+
iframe.src = streamingUrl;
|
908 |
+
iframe.setAttribute('allowfullscreen', '');
|
909 |
+
iframe.setAttribute('scrolling', 'no');
|
910 |
+
iframe.setAttribute('frameborder', '0');
|
911 |
+
iframe.setAttribute('marginwidth', '0');
|
912 |
+
iframe.setAttribute('marginheight', '0');
|
913 |
+
iframe.style.width = '100%';
|
914 |
+
iframe.style.height = '100%';
|
915 |
+
iframe.style.border = 'none';
|
916 |
+
|
917 |
+
// Gestion des erreurs de chargement
|
918 |
+
iframe.onerror = function() {
|
919 |
+
playerContainer.innerHTML = `
|
920 |
+
<div class="flex flex-col items-center justify-center h-full text-red-400">
|
921 |
+
<i class="fas fa-exclamation-triangle text-4xl mb-4"></i>
|
922 |
+
<p class="text-lg">Erreur lors du chargement du flux vidéo</p>
|
923 |
+
<p class="text-sm text-gray-400 mt-2">Le serveur peut être temporairement indisponible</p>
|
924 |
+
<button onclick="tryAlternativeServer()" class="mt-4 px-4 py-2 bg-primary text-white rounded hover:bg-secondary transition">
|
925 |
+
<i class="fas fa-sync-alt mr-2"></i> Essayer un autre serveur
|
926 |
+
</button>
|
927 |
+
</div>
|
928 |
+
`;
|
929 |
+
};
|
930 |
+
|
931 |
+
// Remplacer le chargement par le lecteur
|
932 |
+
playerContainer.innerHTML = '';
|
933 |
+
playerContainer.appendChild(iframe);
|
934 |
+
|
935 |
+
// Mettre le focus sur la fenêtre de streaming
|
936 |
+
streamingWindow.focus();
|
937 |
+
|
938 |
+
// Tentative de lecture automatique (peut être bloquée par le navigateur)
|
939 |
+
setTimeout(() => {
|
940 |
+
try {
|
941 |
+
iframe.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
|
942 |
+
} catch (e) {
|
943 |
+
console.log("Auto-play blocked by browser");
|
944 |
+
}
|
945 |
+
}, 2000);
|
946 |
+
}
|
947 |
+
|
948 |
+
// Essayer un autre serveur en cas d'erreur
|
949 |
+
function tryAlternativeServer() {
|
950 |
+
const servers = Object.keys(STREAMING_SERVERS);
|
951 |
+
const currentIndex = servers.indexOf(selectedServer);
|
952 |
+
const nextIndex = (currentIndex + 1) % servers.length;
|
953 |
+
|
954 |
+
selectedServer = servers[nextIndex];
|
955 |
+
startAutoStreaming(currentMovieId, document.getElementById('streaming-title').textContent);
|
956 |
+
}
|
957 |
+
|
958 |
+
// Fermer la fenêtre de streaming
|
959 |
+
function closeStreamingWindow() {
|
960 |
+
const playerContainer = document.getElementById('streaming-player-container');
|
961 |
+
playerContainer.innerHTML = '';
|
962 |
+
document.getElementById('streaming-window').classList.add('hidden');
|
963 |
+
}
|
964 |
+
|
965 |
+
// Changer la qualité de streaming (simulé)
|
966 |
+
function changeQuality(quality) {
|
967 |
+
alert(`Qualité changée en ${quality}. Note: Ceci est une démonstration.`);
|
968 |
+
// En réalité, vous devriez mettre à jour la source du lecteur vidéo
|
969 |
+
}
|
970 |
+
|
971 |
+
// Basculer en plein écran
|
972 |
+
function toggleFullscreen() {
|
973 |
+
const playerContainer = document.getElementById('streaming-player-container');
|
974 |
+
if (playerContainer.requestFullscreen) {
|
975 |
+
playerContainer.requestFullscreen();
|
976 |
+
} else if (playerContainer.webkitRequestFullscreen) {
|
977 |
+
playerContainer.webkitRequestFullscreen();
|
978 |
+
} else if (playerContainer.msRequestFullscreen) {
|
979 |
+
playerContainer.msRequestFullscreen();
|
980 |
+
}
|
981 |
+
}
|
982 |
+
</script>
|
983 |
+
<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=docto41/cinestream-ia" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
984 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
activer la lecture des films dans une nouvelle page en mode pilotage automatique
|
2 |
+
AJOUTER DES SEVEURS AUTOMATIQUE POUR RAGARDER LES FILMS
|