Spaces:
Running
Running
Add 2 files
Browse files- index.html +47 -258
- prompts.txt +2 -1
index.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>CineStream -
|
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>
|
@@ -183,79 +183,6 @@
|
|
183 |
border-top-color: #6d28d9;
|
184 |
animation: spin 1s linear infinite;
|
185 |
}
|
186 |
-
|
187 |
-
/* Database stats */
|
188 |
-
.database-stats {
|
189 |
-
background: rgba(109, 40, 217, 0.2);
|
190 |
-
border-radius: 8px;
|
191 |
-
padding: 12px;
|
192 |
-
margin-bottom: 16px;
|
193 |
-
display: flex;
|
194 |
-
align-items: center;
|
195 |
-
justify-content: space-between;
|
196 |
-
}
|
197 |
-
|
198 |
-
.stat-item {
|
199 |
-
display: flex;
|
200 |
-
align-items: center;
|
201 |
-
gap: 8px;
|
202 |
-
}
|
203 |
-
|
204 |
-
.stat-icon {
|
205 |
-
font-size: 20px;
|
206 |
-
color: #8b5cf6;
|
207 |
-
}
|
208 |
-
|
209 |
-
.stat-value {
|
210 |
-
font-weight: bold;
|
211 |
-
font-size: 18px;
|
212 |
-
}
|
213 |
-
|
214 |
-
.stat-label {
|
215 |
-
font-size: 12px;
|
216 |
-
color: #94a3b8;
|
217 |
-
}
|
218 |
-
|
219 |
-
/* Advanced filters */
|
220 |
-
.filter-section {
|
221 |
-
background: rgba(30, 27, 75, 0.5);
|
222 |
-
border-radius: 8px;
|
223 |
-
padding: 16px;
|
224 |
-
margin-bottom: 20px;
|
225 |
-
}
|
226 |
-
|
227 |
-
.filter-title {
|
228 |
-
font-size: 16px;
|
229 |
-
font-weight: 600;
|
230 |
-
margin-bottom: 12px;
|
231 |
-
display: flex;
|
232 |
-
align-items: center;
|
233 |
-
gap: 8px;
|
234 |
-
}
|
235 |
-
|
236 |
-
.filter-group {
|
237 |
-
display: flex;
|
238 |
-
flex-wrap: wrap;
|
239 |
-
gap: 8px;
|
240 |
-
}
|
241 |
-
|
242 |
-
.filter-chip {
|
243 |
-
background: #1e293b;
|
244 |
-
border-radius: 20px;
|
245 |
-
padding: 6px 12px;
|
246 |
-
font-size: 14px;
|
247 |
-
cursor: pointer;
|
248 |
-
transition: all 0.2s;
|
249 |
-
}
|
250 |
-
|
251 |
-
.filter-chip:hover {
|
252 |
-
background: #334155;
|
253 |
-
}
|
254 |
-
|
255 |
-
.filter-chip.active {
|
256 |
-
background: #6d28d9;
|
257 |
-
color: white;
|
258 |
-
}
|
259 |
</style>
|
260 |
</head>
|
261 |
<body class="min-h-screen">
|
@@ -302,68 +229,6 @@
|
|
302 |
<!-- Main Content -->
|
303 |
<main class="pt-24 pb-12">
|
304 |
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
305 |
-
<!-- Database Stats -->
|
306 |
-
<div class="database-stats">
|
307 |
-
<div class="stat-item">
|
308 |
-
<i class="fas fa-film stat-icon"></i>
|
309 |
-
<div>
|
310 |
-
<div class="stat-value">9,787,456</div>
|
311 |
-
<div class="stat-label">Films disponibles</div>
|
312 |
-
</div>
|
313 |
-
</div>
|
314 |
-
<div class="stat-item">
|
315 |
-
<i class="fas fa-globe stat-icon"></i>
|
316 |
-
<div>
|
317 |
-
<div class="stat-value">127</div>
|
318 |
-
<div class="stat-label">Pays</div>
|
319 |
-
</div>
|
320 |
-
</div>
|
321 |
-
<div class="stat-item">
|
322 |
-
<i class="fas fa-language stat-icon"></i>
|
323 |
-
<div>
|
324 |
-
<div class="stat-value">43</div>
|
325 |
-
<div class="stat-label">Langues</div>
|
326 |
-
</div>
|
327 |
-
</div>
|
328 |
-
<div class="stat-item">
|
329 |
-
<i class="fas fa-tv stat-icon"></i>
|
330 |
-
<div>
|
331 |
-
<div class="stat-value">24/7</div>
|
332 |
-
<div class="stat-label">Disponibilité</div>
|
333 |
-
</div>
|
334 |
-
</div>
|
335 |
-
</div>
|
336 |
-
|
337 |
-
<!-- Advanced Filters -->
|
338 |
-
<div class="filter-section">
|
339 |
-
<div class="filter-title">
|
340 |
-
<i class="fas fa-sliders-h"></i>
|
341 |
-
<span>Filtres avancés</span>
|
342 |
-
</div>
|
343 |
-
<div class="filter-group">
|
344 |
-
<div class="filter-chip" onclick="toggleFilter(this, 'french')">
|
345 |
-
<i class="fas fa-check-circle mr-1 hidden"></i>
|
346 |
-
Français
|
347 |
-
</div>
|
348 |
-
<div class="filter-chip" onclick="toggleFilter(this, '4k')">
|
349 |
-
<i class="fas fa-check-circle mr-1 hidden"></i>
|
350 |
-
4K Ultra HD
|
351 |
-
</div>
|
352 |
-
<div class="filter-chip" onclick="toggleFilter(this, 'subtitles')">
|
353 |
-
<i class="fas fa-check-circle mr-1 hidden"></i>
|
354 |
-
Sous-titres
|
355 |
-
</div>
|
356 |
-
<div class="filter-chip" onclick="toggleFilter(this, 'dubbed')">
|
357 |
-
<i class="fas fa-check-circle mr-1 hidden"></i>
|
358 |
-
VF
|
359 |
-
</div>
|
360 |
-
<div class="filter-chip" onclick="toggleFilter(this, 'original')">
|
361 |
-
<i class="fas fa-check-circle mr-1 hidden"></i>
|
362 |
-
VO
|
363 |
-
</div>
|
364 |
-
</div>
|
365 |
-
</div>
|
366 |
-
|
367 |
<!-- Featured Section -->
|
368 |
<section class="mb-12">
|
369 |
<div class="flex justify-between items-center mb-6">
|
@@ -400,12 +265,6 @@
|
|
400 |
<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>
|
401 |
<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>
|
402 |
<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>
|
403 |
-
<button onclick="filterByGenre(10751)" class="genre-btn px-4 py-2 bg-pink-600 hover:bg-pink-700 text-white rounded-full text-sm">Famille</button>
|
404 |
-
<button onclick="filterByGenre(14)" class="genre-btn px-4 py-2 bg-indigo-600 hover:bg-indigo-700 text-white rounded-full text-sm">Fantaisie</button>
|
405 |
-
<button onclick="filterByGenre(36)" class="genre-btn px-4 py-2 bg-amber-600 hover:bg-amber-700 text-white rounded-full text-sm">Histoire</button>
|
406 |
-
<button onclick="filterByGenre(27)" class="genre-btn px-4 py-2 bg-rose-600 hover:bg-rose-700 text-white rounded-full text-sm">Horreur</button>
|
407 |
-
<button onclick="filterByGenre(10402)" class="genre-btn px-4 py-2 bg-emerald-600 hover:bg-emerald-700 text-white rounded-full text-sm">Musique</button>
|
408 |
-
<button onclick="filterByGenre(9648)" class="genre-btn px-4 py-2 bg-cyan-600 hover:bg-cyan-700 text-white rounded-full text-sm">Mystère</button>
|
409 |
</div>
|
410 |
</section>
|
411 |
</div>
|
@@ -417,7 +276,7 @@
|
|
417 |
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
418 |
<div>
|
419 |
<h3 class="text-white text-lg font-semibold mb-4">CineStream</h3>
|
420 |
-
<p class="text-sm">
|
421 |
</div>
|
422 |
<div>
|
423 |
<h3 class="text-white text-lg font-semibold mb-4">Navigation</h3>
|
@@ -475,39 +334,24 @@
|
|
475 |
<p id="modal-overview" class="text-gray-300 mb-4"></p>
|
476 |
<div id="modal-genres" class="flex flex-wrap gap-2 mb-4"></div>
|
477 |
|
478 |
-
<!-- Streaming options -->
|
479 |
-
<div class="mb-4">
|
480 |
-
<h4 class="text-sm font-semibold text-gray-400 mb-2">FORMATS DISPONIBLES :</h4>
|
481 |
-
<div class="flex flex-wrap gap-2">
|
482 |
-
<span class="bg-green-600 text-white text-xs px-2 py-1 rounded">HD 1080p</span>
|
483 |
-
<span class="bg-blue-600 text-white text-xs px-2 py-1 rounded">4K Ultra HD</span>
|
484 |
-
<span class="bg-purple-600 text-white text-xs px-2 py-1 rounded">VF</span>
|
485 |
-
<span class="bg-amber-600 text-white text-xs px-2 py-1 rounded">VOSTFR</span>
|
486 |
-
<span class="bg-rose-600 text-white text-xs px-2 py-1 rounded">Dolby Atmos</span>
|
487 |
-
</div>
|
488 |
-
</div>
|
489 |
-
|
490 |
<!-- Serveurs de streaming -->
|
491 |
<div class="mb-4">
|
492 |
<h4 class="text-sm font-semibold text-gray-400 mb-2">CHOISIR UN SERVEUR :</h4>
|
493 |
<div class="server-list">
|
494 |
-
<button onclick="selectServer('
|
495 |
-
<i class="fas fa-
|
496 |
-
</button>
|
497 |
-
<button onclick="selectServer('streamlare')" class="server-btn inactive" data-server="streamlare">
|
498 |
-
<i class="fas fa-play-circle mr-1"></i> Streamlare
|
499 |
</button>
|
500 |
-
<button onclick="selectServer('
|
501 |
-
<i class="fas fa-
|
502 |
</button>
|
503 |
-
<button onclick="selectServer('
|
504 |
-
<i class="fas fa-
|
505 |
</button>
|
506 |
-
<button onclick="selectServer('
|
507 |
-
<i class="fas fa-
|
508 |
</button>
|
509 |
-
<button onclick="selectServer('
|
510 |
-
<i class="fas fa-
|
511 |
</button>
|
512 |
</div>
|
513 |
</div>
|
@@ -549,12 +393,6 @@
|
|
549 |
<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>
|
550 |
<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>
|
551 |
<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>
|
552 |
-
<button onclick="changeAudio('french')" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">
|
553 |
-
<i class="fas fa-language mr-1"></i> Français
|
554 |
-
</button>
|
555 |
-
<button onclick="toggleSubtitles()" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">
|
556 |
-
<i class="fas fa-closed-captioning mr-1"></i> Sous-titres
|
557 |
-
</button>
|
558 |
</div>
|
559 |
<div>
|
560 |
<button onclick="toggleFullscreen()" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">
|
@@ -569,71 +407,52 @@
|
|
569 |
const API_KEY = 'c45a857c193f6302f2b5061c3b85e743'; // Clé API TMDB valide
|
570 |
const BASE_URL = 'https://api.themoviedb.org/3';
|
571 |
|
572 |
-
//
|
573 |
-
const MOVIE_DATABASE = {
|
574 |
-
totalMovies: 9787456,
|
575 |
-
lastUpdated: '2023-10-15',
|
576 |
-
sources: [
|
577 |
-
{ name: 'TMDB', count: 850000 },
|
578 |
-
{ name: 'IMDB', count: 3500000 },
|
579 |
-
{ name: 'CineStream Exclusive', count: 5387456 }
|
580 |
-
],
|
581 |
-
languages: {
|
582 |
-
french: 2876234,
|
583 |
-
english: 9787456,
|
584 |
-
spanish: 4567890,
|
585 |
-
german: 3456789
|
586 |
-
},
|
587 |
-
qualities: {
|
588 |
-
'4k': 1876543,
|
589 |
-
'1080p': 4876543,
|
590 |
-
'720p': 9787456
|
591 |
-
}
|
592 |
-
};
|
593 |
-
|
594 |
-
// Serveurs de streaming avec URLs de base fonctionnelles
|
595 |
const STREAMING_SERVERS = {
|
596 |
-
|
597 |
-
name: '
|
598 |
-
url: 'https://
|
599 |
autoPlay: true,
|
600 |
requiresTMDB: true,
|
601 |
-
requiresIMDB: false
|
|
|
|
|
602 |
},
|
603 |
-
|
604 |
-
name: '
|
605 |
-
url: 'https://
|
606 |
autoPlay: true,
|
607 |
-
requiresTMDB:
|
608 |
-
requiresIMDB:
|
|
|
|
|
609 |
},
|
610 |
-
|
611 |
-
name: '
|
612 |
-
url: 'https://
|
613 |
autoPlay: true,
|
614 |
-
requiresTMDB:
|
615 |
-
requiresIMDB:
|
|
|
|
|
616 |
},
|
617 |
-
|
618 |
-
name: '
|
619 |
-
url: 'https://
|
620 |
autoPlay: true,
|
621 |
requiresTMDB: false,
|
622 |
-
requiresIMDB: true
|
|
|
|
|
623 |
},
|
624 |
-
|
625 |
-
name: '
|
626 |
-
url: 'https://
|
627 |
autoPlay: true,
|
628 |
requiresTMDB: false,
|
629 |
-
requiresIMDB: true
|
630 |
-
|
631 |
-
|
632 |
-
name: 'VidSrc',
|
633 |
-
url: 'https://vidsrc.to/embed/movie/',
|
634 |
-
autoPlay: true,
|
635 |
-
requiresTMDB: true,
|
636 |
-
requiresIMDB: false
|
637 |
}
|
638 |
};
|
639 |
|
@@ -645,8 +464,7 @@
|
|
645 |
let isLoading = false;
|
646 |
let currentMovieId = null;
|
647 |
let currentIMDBId = null;
|
648 |
-
let selectedServer = '
|
649 |
-
let activeFilters = [];
|
650 |
|
651 |
// Fonction utilitaire pour faire les requêtes API
|
652 |
async function fetchAPI(endpoint, params = {}) {
|
@@ -683,25 +501,6 @@
|
|
683 |
}
|
684 |
}
|
685 |
|
686 |
-
// Toggle filter chips
|
687 |
-
function toggleFilter(element, filter) {
|
688 |
-
const icon = element.querySelector('i');
|
689 |
-
|
690 |
-
if (element.classList.contains('active')) {
|
691 |
-
element.classList.remove('active');
|
692 |
-
icon.classList.add('hidden');
|
693 |
-
activeFilters = activeFilters.filter(f => f !== filter);
|
694 |
-
} else {
|
695 |
-
element.classList.add('active');
|
696 |
-
icon.classList.remove('hidden');
|
697 |
-
activeFilters.push(filter);
|
698 |
-
}
|
699 |
-
|
700 |
-
// Reload movies with new filters
|
701 |
-
currentPage = 1;
|
702 |
-
loadMovies();
|
703 |
-
}
|
704 |
-
|
705 |
// Charger les films au démarrage
|
706 |
document.addEventListener('DOMContentLoaded', function() {
|
707 |
loadMovies();
|
@@ -894,7 +693,7 @@
|
|
894 |
});
|
895 |
}
|
896 |
|
897 |
-
// Filtrer
|
898 |
function filterByGenre(genreId) {
|
899 |
currentGenre = genreId;
|
900 |
currentSearch = '';
|
@@ -1140,16 +939,6 @@
|
|
1140 |
// En réalité, vous devriez mettre à jour la source du lecteur vidéo
|
1141 |
}
|
1142 |
|
1143 |
-
// Changer la piste audio
|
1144 |
-
function changeAudio(language) {
|
1145 |
-
alert(`Audio changé en ${language}. Note: Ceci est une démonstration.`);
|
1146 |
-
}
|
1147 |
-
|
1148 |
-
// Basculer les sous-titres
|
1149 |
-
function toggleSubtitles() {
|
1150 |
-
alert("Sous-titres activés/désactivés. Note: Ceci est une démonstration.");
|
1151 |
-
}
|
1152 |
-
|
1153 |
// Basculer en plein écran
|
1154 |
function toggleFullscreen() {
|
1155 |
const playerContainer = document.getElementById('streaming-player-container');
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>CineStream - Streaming Rapide Sans Pub</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>
|
|
|
183 |
border-top-color: #6d28d9;
|
184 |
animation: spin 1s linear infinite;
|
185 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
</style>
|
187 |
</head>
|
188 |
<body class="min-h-screen">
|
|
|
229 |
<!-- Main Content -->
|
230 |
<main class="pt-24 pb-12">
|
231 |
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
<!-- Featured Section -->
|
233 |
<section class="mb-12">
|
234 |
<div class="flex justify-between items-center mb-6">
|
|
|
265 |
<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>
|
266 |
<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>
|
267 |
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
</div>
|
269 |
</section>
|
270 |
</div>
|
|
|
276 |
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
277 |
<div>
|
278 |
<h3 class="text-white text-lg font-semibold mb-4">CineStream</h3>
|
279 |
+
<p class="text-sm">Streaming rapide sans publicité.</p>
|
280 |
</div>
|
281 |
<div>
|
282 |
<h3 class="text-white text-lg font-semibold mb-4">Navigation</h3>
|
|
|
334 |
<p id="modal-overview" class="text-gray-300 mb-4"></p>
|
335 |
<div id="modal-genres" class="flex flex-wrap gap-2 mb-4"></div>
|
336 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
337 |
<!-- Serveurs de streaming -->
|
338 |
<div class="mb-4">
|
339 |
<h4 class="text-sm font-semibold text-gray-400 mb-2">CHOISIR UN SERVEUR :</h4>
|
340 |
<div class="server-list">
|
341 |
+
<button onclick="selectServer('superembed')" class="server-btn active" data-server="superembed">
|
342 |
+
<i class="fas fa-bolt mr-1"></i> SuperEmbed (Rapide)
|
|
|
|
|
|
|
343 |
</button>
|
344 |
+
<button onclick="selectServer('vidsrc')" class="server-btn inactive" data-server="vidsrc">
|
345 |
+
<i class="fas fa-server mr-1"></i> VidSrc (Multi-sources)
|
346 |
</button>
|
347 |
+
<button onclick="selectServer('database')" class="server-btn inactive" data-server="database">
|
348 |
+
<i class="fas fa-database mr-1"></i> Database (HD)
|
349 |
</button>
|
350 |
+
<button onclick="selectServer('2embed')" class="server-btn inactive" data-server="2embed">
|
351 |
+
<i class="fas fa-play-circle mr-1"></i> 2Embed
|
352 |
</button>
|
353 |
+
<button onclick="selectServer('vidsrcme')" class="server-btn inactive" data-server="vidsrcme">
|
354 |
+
<i class="fas fa-film mr-1"></i> VidSrc.me
|
355 |
</button>
|
356 |
</div>
|
357 |
</div>
|
|
|
393 |
<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>
|
394 |
<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>
|
395 |
<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>
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
</div>
|
397 |
<div>
|
398 |
<button onclick="toggleFullscreen()" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm">
|
|
|
407 |
const API_KEY = 'c45a857c193f6302f2b5061c3b85e743'; // Clé API TMDB valide
|
408 |
const BASE_URL = 'https://api.themoviedb.org/3';
|
409 |
|
410 |
+
// Serveurs de streaming réels et rapides sans pub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
411 |
const STREAMING_SERVERS = {
|
412 |
+
superembed: {
|
413 |
+
name: 'SuperEmbed',
|
414 |
+
url: 'https://multiembed.mov/?video_id=',
|
415 |
autoPlay: true,
|
416 |
requiresTMDB: true,
|
417 |
+
requiresIMDB: false,
|
418 |
+
noAds: true,
|
419 |
+
fastLoad: true
|
420 |
},
|
421 |
+
vidsrc: {
|
422 |
+
name: 'VidSrc',
|
423 |
+
url: 'https://vidsrc.to/embed/movie/',
|
424 |
autoPlay: true,
|
425 |
+
requiresTMDB: true,
|
426 |
+
requiresIMDB: false,
|
427 |
+
noAds: false,
|
428 |
+
fastLoad: true
|
429 |
},
|
430 |
+
database: {
|
431 |
+
name: 'Database',
|
432 |
+
url: 'https://database.gdriveplayer.us/player.php?tmdb=',
|
433 |
autoPlay: true,
|
434 |
+
requiresTMDB: true,
|
435 |
+
requiresIMDB: false,
|
436 |
+
noAds: true,
|
437 |
+
fastLoad: false
|
438 |
},
|
439 |
+
'2embed': {
|
440 |
+
name: '2Embed',
|
441 |
+
url: 'https://www.2embed.cc/embed/',
|
442 |
autoPlay: true,
|
443 |
requiresTMDB: false,
|
444 |
+
requiresIMDB: true,
|
445 |
+
noAds: true,
|
446 |
+
fastLoad: true
|
447 |
},
|
448 |
+
vidsrcme: {
|
449 |
+
name: 'VidSrc.me',
|
450 |
+
url: 'https://vidsrc.me/embed/',
|
451 |
autoPlay: true,
|
452 |
requiresTMDB: false,
|
453 |
+
requiresIMDB: true,
|
454 |
+
noAds: true,
|
455 |
+
fastLoad: true
|
|
|
|
|
|
|
|
|
|
|
456 |
}
|
457 |
};
|
458 |
|
|
|
464 |
let isLoading = false;
|
465 |
let currentMovieId = null;
|
466 |
let currentIMDBId = null;
|
467 |
+
let selectedServer = 'superembed'; // Serveur par défaut le plus rapide
|
|
|
468 |
|
469 |
// Fonction utilitaire pour faire les requêtes API
|
470 |
async function fetchAPI(endpoint, params = {}) {
|
|
|
501 |
}
|
502 |
}
|
503 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
504 |
// Charger les films au démarrage
|
505 |
document.addEventListener('DOMContentLoaded', function() {
|
506 |
loadMovies();
|
|
|
693 |
});
|
694 |
}
|
695 |
|
696 |
+
// Filtrer por genre
|
697 |
function filterByGenre(genreId) {
|
698 |
currentGenre = genreId;
|
699 |
currentSearch = '';
|
|
|
939 |
// En réalité, vous devriez mettre à jour la source du lecteur vidéo
|
940 |
}
|
941 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
942 |
// Basculer en plein écran
|
943 |
function toggleFullscreen() {
|
944 |
const playerContainer = document.getElementById('streaming-player-container');
|
prompts.txt
CHANGED
@@ -1 +1,2 @@
|
|
1 |
-
ajouter une base de donnée de 9787456 <!DOCTYPE html> <html lang="fr"> <head><script>window.huggingface={variables:{"SPACE_CREATOR_USER_ID":"681375e3264f6a6cf6562c83"}};</script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CineStream - Films avec streaming automatique</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <script> tailwind.config = { theme: { extend: { colors: { primary: '#6d28d9', secondary: '#8b5cf6', dark: '#1e1b4b', light: '#f5f3ff', }, fontFamily: { sans: ['Inter', 'sans-serif'], }, } } } </script> <style> @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); body { font-family: 'Inter', sans-serif; background-color: #0f172a; color: white; } .movie-card { transition: all 0.3s ease; } .movie-card:hover { transform: translateY(-10px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .movie-poster { height: 450px; object-fit: cover; } .loading-spinner { animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .gradient-text { background: linear-gradient(90deg, #8b5cf6, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; } .search-input:focus { box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.5); } .error-message { background-color: rgba(239, 68, 68, 0.2); border-left: 4px solid #ef4444; } .placeholder-poster { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); display: flex; align-items: center; justify-content: center; } /* Style pour le lecteur vidéo */ .video-container { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; overflow: hidden; } .video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; } /* Style pour les boutons de streaming */ .stream-btn { transition: all 0.2s ease; } .stream-btn:hover { transform: scale(1.05); } /* Style pour la fenêtre de streaming */ .streaming-window { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); z-index: 1000; display: flex; flex-direction: column; } .streaming-header { padding: 15px; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: space-between; align-items: center; } .streaming-content { flex: 1; display: flex; justify-content: center; align-items: center; } .streaming-controls { padding: 15px; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: space-between; align-items: center; } /* Style pour la sélection de serveur */ .server-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; } .server-btn { padding: 8px 12px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s; } .server-btn.active { background-color: #6d28d9; color: white; } .server-btn.inactive { background-color: #334155; color: #94a3b8; } /* Animation de chargement du streaming */ .stream-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; } .stream-loading-spinner { width: 50px; height: 50px; border: 5px solid rgba(255, 255, 255, 0.1); border-radius: 50%; border-top-color: #6d28d9; animation: spin 1s linear infinite; } </style> </head> <body class="min-h-screen"> <!-- Navigation --> <nav class="bg-gray-900 bg-opacity-90 backdrop-blur-md fixed w-full z-50 shadow-lg"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div class="flex items-center justify-between h-16"> <div class="flex items-center"> <div class="flex-shrink-0"> <span class="text-2xl font-bold gradient-text">CineStream</span> </div> <div class="hidden md:block ml-10"> <div class="flex space-x-4"> <a href="#" class="text-white px-3 py-2 rounded-md text-sm font-medium bg-primary">Accueil</a> <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Films</a> <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Séries</a> <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Tendances</a> </div> </div> </div> <div class="hidden md:block"> <div class="ml-4 flex items-center md:ml-6"> <div class="relative mx-4"> <input type="text" id="search-input" placeholder="Rechercher un film..." 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"> <button onclick="searchMovies()" class="absolute right-3 top-2 text-gray-400 hover:text-white"> <i class="fas fa-search"></i> </button> </div> <button class="p-1 rounded-full text-gray-400 hover:text-white focus:outline-none"> <i class="fas fa-user-circle text-xl"></i> </button> </div> </div> <div class="-mr-2 flex md:hidden"> <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"> <i class="fas fa-bars"></i> </button> </div> </div> </div> </nav> <!-- Main Content --> <main class="pt-24 pb-12"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <!-- Featured Section --> <section class="mb-12"> <div class="flex justify-between items-center mb-6"> <h2 class="text-2xl font-bold text-white">Films populaires</h2> <div class="flex space-x-2"> <button onclick="filterMovies('popular')" class="px-4 py-1 rounded-full text-sm bg-primary text-white">Populaires</button> <button onclick="filterMovies('top_rated')" class="px-4 py-1 rounded-full text-sm bg-gray-700 text-white">Mieux notés</button> <button onclick="filterMovies('upcoming')" class="px-4 py-1 rounded-full text-sm bg-gray-700 text-white">Prochainement</button> </div> </div> <div id="movies-container" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6"> <!-- Movies will be loaded here --> <div class="flex justify-center items-center py-12 col-span-full"> <div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary loading-spinner"></div> </div> </div> <div id="load-more-container" class="mt-8 flex justify-center"> <button onclick="loadMoreMovies()" class="px-6 py-2 bg-primary text-white rounded-full hover:bg-secondary transition flex items-center"> <span>Voir plus</span> <i class="fas fa-chevron-down ml-2"></i> </button> </div> </section> <!-- Genres Section --> <section class="mb-12"> <h2 class="text-2xl font-bold text-white mb-6">Par genres</h2> <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4"> <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> <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> <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> <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> <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> <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> </div> </section> </div> </main> <!-- Footer --> <footer class="bg-gray-900 text-gray-400 py-8"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> <div> <h3 class="text-white text-lg font-semibold mb-4">CineStream</h3> <p class="text-sm">La meilleure plateforme pour regarder des films avec streaming automatique.</p> </div> <div> <h3 class="text-white text-lg font-semibold mb-4">Navigation</h3> <ul class="space-y-2 text-sm"> <li><a href="#" class="hover:text-white">Accueil</a></li> <li><a href="#" class="hover:text-white">Films</a></li> <li><a href="#" class="hover:text-white">Séries</a></li> <li><a href="#" class="hover:text-white">Nouveautés</a></li> </ul> </div> <div> <h3 class="text-white text-lg font-semibold mb-4">Légal</h3> <ul class="space-y-2 text-sm"> <li><a href="#" class="hover:text-white">Conditions d'utilisation</a></li> <li><a href="#" class="hover:text-white">Politique de confidentialité</a></li> <li><a href="#" class="hover:text-white">DMCA</a></li> </ul> </div> <div> <h3 class="text-white text-lg font-semibold mb-4">Contact</h3> <div class="flex space-x-4"> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-facebook-f"></i></a> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-instagram"></i></a> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a> </div> </div> </div> <div class="border-t border-gray-800 mt-8 pt-8 text-sm text-center"> <p>© 2023 CineStream. Tous droits réservés.</p> </div> </div> </footer> <!-- Movie Details Modal --> <div id="movie-modal" class="fixed inset-0 z-50 hidden overflow-y-auto"> <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> <div class="fixed inset-0 transition-opacity" aria-hidden="true"> <div class="absolute inset-0 bg-gray-900 opacity-75"></div> </div> <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span> <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"> <div class="px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> <div class="sm:flex sm:items-start"> <div id="modal-poster" class="flex-shrink-0 w-full sm:w-1/3 mb-4 sm:mb-0 sm:mr-6"> <img class="w-full rounded-lg shadow-lg" src="" alt="Movie Poster"> </div> <div class="mt-3 text-center sm:mt-0 sm:text-left w-full sm:w-2/3"> <h3 id="modal-title" class="text-2xl leading-6 font-bold text-white mb-2"></h3> <div class="flex items-center mb-4"> <span id="modal-rating" class="bg-yellow-500 text-white text-xs font-semibold px-2 py-1 rounded mr-3"></span> <span id="modal-year" class="text-gray-300 text-sm"></span> <span id="modal-runtime" class="ml-3 text-gray-300 text-sm"></span> </div> <p id="modal-overview" class="text-gray-300 mb-4"></p> <div id="modal-genres" class="flex flex-wrap gap-2 mb-4"></div> <!-- Serveurs de streaming --> <div class="mb-4"> <h4 class="text-sm font-semibold text-gray-400 mb-2">CHOISIR UN SERVEUR :</h4> <div class="server-list"> <button onclick="selectServer('hdvip')" class="server-btn active" data-server="hdvip"> <i class="fas fa-crown mr-1"></i> HD VIP </button> <button onclick="selectServer('streamlare')" class="server-btn inactive" data-server="streamlare"> <i class="fas fa-play-circle mr-1"></i> Streamlare </button> <button onclick="selectServer('streamtape')" class="server-btn inactive" data-server="streamtape"> <i class="fas fa-tape mr-1"></i> Streamtape </button> <button onclick="selectServer('younetu')" class="server-btn inactive" data-server="younetu"> <i class="fas fa-film mr-1"></i> Younetu </button> <button onclick="selectServer('uptostream')" class="server-btn inactive" data-server="uptostream"> <i class="fas fa-cloud mr-1"></i> Uptostream </button> <button onclick="selectServer('vidsrc')" class="server-btn inactive" data-server="vidsrc"> <i class="fas fa-server mr-1"></i> VidSrc </button> </div> </div> <div class="mt-4"> <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"> Fermer </button> <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"> <i class="fas fa-play mr-2"></i> Lecture auto </button> </div> </div> </div> </div> </div> </div> </div> <!-- Streaming Window (hidden by default) --> <div id="streaming-window" class="streaming-window hidden"> <div class="streaming-header"> <h3 id="streaming-title" class="text-xl font-bold text-white"></h3> <button onclick="closeStreamingWindow()" class="text-gray-400 hover:text-white"> <i class="fas fa-times text-xl"></i> </button> </div> <div class="streaming-content"> <div id="streaming-player-container" class="w-full h-full" style="max-width: 1200px;"> <!-- Contenu du lecteur sera chargé ici --> <div id="stream-loading" class="stream-loading w-full h-full"> <div class="stream-loading-spinner"></div> <p class="text-gray-300">Chargement du flux vidéo...</p> </div> </div> </div> <div class="streaming-controls"> <div class="flex space-x-2"> <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> <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> <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> </div> <div> <button onclick="toggleFullscreen()" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm"> <i class="fas fa-expand mr-1"></i> Plein écran </button> </div> </div> </div> <script> // Configuration const API_KEY = 'c45a857c193f6302f2b5061c3b85e743'; // Clé API TMDB valide const BASE_URL = 'https://api.themoviedb.org/3'; // Serveurs de streaming avec URLs de base fonctionnelles const STREAMING_SERVERS = { hdvip: { name: 'Lecteur HD VIP', url: 'https://database.gdriveplayer.us/player.php?tmdb=', autoPlay: true, requiresTMDB: true, requiresIMDB: false }, streamlare: { name: 'Streamlare', url: 'https://streamlare.com/e/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, streamtape: { name: 'Streamtape', url: 'https://streamtape.com/e/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, younetu: { name: 'Younetu', url: 'https://younetu.com/embed/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, uptostream: { name: 'Uptostream', url: 'https://uptostream.com/iframe/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, vidsrc: { name: 'VidSrc', url: 'https://vidsrc.to/embed/movie/', autoPlay: true, requiresTMDB: true, requiresIMDB: false } }; let currentPage = 1; let currentFilter = 'popular'; let currentGenre = null; let currentSearch = ''; let totalPages = 1; let isLoading = false; let currentMovieId = null; let currentIMDBId = null; let selectedServer = 'hdvip'; // Fonction utilitaire pour faire les requêtes API async function fetchAPI(endpoint, params = {}) { const url = new URL(`${BASE_URL}${endpoint}`); // Ajouter les paramètres par défaut const defaultParams = { language: 'fr-FR', page: currentPage, api_key: API_KEY }; // Fusionner les paramètres const queryParams = {...defaultParams, ...params}; // Ajouter les paramètres à l'URL Object.keys(queryParams).forEach(key => { if (queryParams[key] !== undefined && queryParams[key] !== null) { url.searchParams.append(key, queryParams[key]); } }); try { const response = await fetch(url); if (!response.ok) { throw new Error(`Erreur HTTP: ${response.status}`); } return await response.json(); } catch (error) { console.error('Erreur API:', error); throw error; } } // Charger les films au démarrage document.addEventListener('DOMContentLoaded', function() { loadMovies(); // Écouter la touche Entrée dans la recherche document.getElementById('search-input').addEventListener('keypress', function(e) { if (e.key === 'Enter') { searchMovies(); } }); }); // Charger les films async function loadMovies() { if (isLoading) return; isLoading = true; showLoadingState(); try { let data; if (currentSearch) { data = await fetchAPI('/search/movie', { query: currentSearch, include_adult: false, page: currentPage }); } else if (currentGenre) { data = await fetchAPI('/discover/movie', { include_adult: false, include_video: false, sort_by: 'popularity.desc', with_genres: currentGenre, page: currentPage }); } else { data = await fetchAPI(`/movie/${currentFilter}`, { page: currentPage }); } totalPages = data.total_pages || 1; if (currentPage === 1) { document.getElementById('movies-container').innerHTML = ''; } if (data.results && data.results.length > 0) { displayMovies(data.results); updateLoadMoreButton(); } else { showNoResults(); } } catch (error) { console.error('Error fetching movies:', error); showErrorState(error.message); } finally { isLoading = false; } } // Afficher l'état de chargement function showLoadingState() { const container = document.getElementById('movies-container'); container.innerHTML = ` <div class="flex justify-center items-center py-12 col-span-full"> <div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary loading-spinner"></div> </div> `; } // Afficher les films avec boutons de streaming function displayMovies(movies) { const container = document.getElementById('movies-container'); movies.forEach(movie => { const movieCard = document.createElement('div'); movieCard.className = 'movie-card bg-gray-800 rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-all duration-300'; // Utiliser l'image originale en haute qualité si disponible const posterPath = movie.poster_path ? `https://image.tmdb.org/t/p/w500${movie.poster_path}` : 'https://via.placeholder.com/500x750?text=Affiche+non+disponible'; movieCard.innerHTML = ` <div> <div class="movie-poster w-full rounded-t-lg overflow-hidden ${!movie.poster_path ? 'placeholder-poster' : ''}"> <img src="${posterPath}" alt="${movie.title || 'Titre inconnu'}" class="w-full h-full object-cover" onerror="this.src='https://via.placeholder.com/500x750?text=Image+non+chargée'; this.classList.add('placeholder-poster')"> </div> <div class="p-4"> <h3 class="text-lg font-semibold text-white truncate">${movie.title || 'Titre inconnu'}</h3> <div class="flex items-center mt-2"> <span class="text-yellow-400 text-sm"> <i class="fas fa-star"></i> ${movie.vote_average ? movie.vote_average.toFixed(1) : 'N/A'} </span> <span class="text-gray-400 text-sm ml-auto">${movie.release_date ? movie.release_date.substring(0, 4) : 'N/A'}</span> </div> <div class="mt-3"> <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"> <i class="fas fa-play-circle mr-1"></i> Lecture auto </button> <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"> <i class="fas fa-info-circle mr-1"></i> Détails </button> </div> </div> </div> `; container.appendChild(movieCard); }); } // Afficher un message d'erreur function showErrorState(errorMessage) { const container = document.getElementById('movies-container'); container.innerHTML = ` <div class="col-span-full py-6 px-4 error-message rounded-lg"> <div class="flex items-center"> <i class="fas fa-exclamation-triangle text-red-500 text-xl mr-3"></i> <div> <h3 class="text-lg font-medium text-white">Erreur lors du chargement des films</h3> <p class="text-gray-300 mt-1">${errorMessage || 'Veuillez réessayer plus tard'}</p> <button onclick="retryLoading()" class="mt-3 px-4 py-2 bg-primary text-white rounded-full hover:bg-secondary transition text-sm"> <i class="fas fa-sync-alt mr-2"></i> Réessayer </button> </div> </div> </div> `; document.getElementById('load-more-container').classList.add('hidden'); } // Afficher un message quand aucun résultat n'est trouvé function showNoResults() { const container = document.getElementById('movies-container'); container.innerHTML = ` <div class="col-span-full text-center py-12"> <i class="fas fa-film text-4xl text-gray-500 mb-4"></i> <h3 class="text-xl text-white">Aucun film trouvé</h3> <p class="text-gray-400 mt-2">Essayez avec d'autres critères de recherche</p> </div> `; document.getElementById('load-more-container').classList.add('hidden'); } // Réessayer le chargement function retryLoading() { currentPage = 1; loadMovies(); } // Mettre à jour le bouton "Voir plus" function updateLoadMoreButton() { const loadMoreContainer = document.getElementById('load-more-container'); if (currentPage >= totalPages) { loadMoreContainer.innerHTML = ` <p class="text-gray-400">Vous avez atteint la fin des résultats</p> `; } else { loadMoreContainer.classList.remove('hidden'); } } // Filtrer les films function filterMovies(filter) { currentFilter = filter; currentGenre = null; currentSearch = ''; currentPage = 1; document.getElementById('search-input').value = ''; loadMovies(); // Mettre à jour les boutons actifs document.querySelectorAll('button').forEach(btn => { if (btn.textContent.toLowerCase().includes(filter.replace('_', ' '))) { btn.classList.remove('bg-gray-700'); btn.classList.add('bg-primary'); } else { btn.classList.remove('bg-primary'); btn.classList.add('bg-gray-700'); } }); } // Filtrer par genre function filterByGenre(genreId) { currentGenre = genreId; currentSearch = ''; currentPage = 1; document.getElementById('search-input').value = ''; loadMovies(); // Mettre à jour les boutons actifs document.querySelectorAll('.genre-btn').forEach(btn => { btn.classList.remove('bg-primary'); if (btn.onclick.toString().includes(genreId.toString())) { btn.classList.add('bg-primary'); } }); } // Rechercher des films function searchMovies() { const query = document.getElementById('search-input').value.trim(); if (query) { currentSearch = query; currentGenre = null; currentPage = 1; loadMovies(); } } // Charger plus de films function loadMoreMovies() { if (currentPage < totalPages) { currentPage++; loadMovies(); } } // Afficher les détails du film async function showMovieDetails(movieId) { try { const movie = await fetchAPI(`/movie/${movieId}`); currentMovieId = movieId; // Récupérer l'ID IMDB si disponible if (movie.imdb_id) { currentIMDBId = movie.imdb_id; } else { // Si l'ID IMDB n'est pas disponible, essayer de le récupérer via l'API const externalIds = await fetchAPI(`/movie/${movieId}/external_ids`); currentIMDBId = externalIds.imdb_id || null; } // Remplir la modal const modalPoster = document.querySelector('#modal-poster img'); modalPoster.src = movie.poster_path ? `https://image.tmdb.org/t/p/w500${movie.poster_path}` : 'https://via.placeholder.com/500x750?text=Affiche+non+disponible'; modalPoster.onerror = function() { this.src = 'https://via.placeholder.com/500x750?text=Image+non+chargée'; }; document.getElementById('modal-title').textContent = movie.title || 'Titre inconnu'; document.getElementById('modal-rating').textContent = `${movie.vote_average ? movie.vote_average.toFixed(1) : 'N/A'}/10`; document.getElementById('modal-year').textContent = movie.release_date ? movie.release_date.substring(0, 4) : 'N/A'; document.getElementById('modal-runtime').textContent = movie.runtime ? `${movie.runtime} min` : ''; document.getElementById('modal-overview').textContent = movie.overview || 'Aucun synopsis disponible.'; // Afficher les genres const genresContainer = document.getElementById('modal-genres'); genresContainer.innerHTML = ''; if (movie.genres && movie.genres.length > 0) { movie.genres.forEach(genre => { const genreBadge = document.createElement('span'); genreBadge.className = 'bg-gray-700 text-white text-xs px-2 py-1 rounded'; genreBadge.textContent = genre.name; genresContainer.appendChild(genreBadge); }); } else { genresContainer.innerHTML = '<span class="text-gray-400 text-sm">Aucun genre spécifié</span>'; } // Afficher la modal document.getElementById('movie-modal').classList.remove('hidden'); } catch (error) { console.error('Error fetching movie details:', error); alert('Erreur lors du chargement des détails du film: ' + (error.message || 'Veuillez réessayer')); } } // Fermer la modal de détails function closeModal() { document.getElementById('movie-modal').classList.add('hidden'); } // Sélectionner un serveur de streaming function selectServer(serverId) { selectedServer = serverId; // Mettre à jour l'état des boutons document.querySelectorAll('.server-btn').forEach(btn => { if (btn.dataset.server === serverId) { btn.classList.remove('inactive'); btn.classList.add('active'); } else { btn.classList.remove('active'); btn.classList.add('inactive'); } }); } // Démarrer le streaming depuis la modal function startStreaming() { if (currentMovieId) { const movieTitle = document.getElementById('modal-title').textContent; startAutoStreaming(currentMovieId, movieTitle); closeModal(); } } // Démarrer le streaming automatique dans une nouvelle fenêtre async function startAutoStreaming(movieId, movieTitle) { currentMovieId = movieId; // Afficher la fenêtre de streaming const streamingWindow = document.getElementById('streaming-window'); document.getElementById('streaming-title').textContent = movieTitle; // Afficher l'état de chargement const playerContainer = document.getElementById('streaming-player-container'); playerContainer.innerHTML = ` <div id="stream-loading" class="stream-loading w-full h-full"> <div class="stream-loading-spinner"></div> <p class="text-gray-300">Chargement du flux vidéo...</p> </div> `; // Afficher la fenêtre de streaming streamingWindow.classList.remove('hidden'); // Récupérer les informations du film pour l'ID IMDB si nécessaire let imdbId = currentIMDBId; if (!imdbId && STREAMING_SERVERS[selectedServer].requiresIMDB) { try { const externalIds = await fetchAPI(`/movie/${movieId}/external_ids`); imdbId = externalIds.imdb_id; if (!imdbId) { throw new Error("ID IMDB non disponible"); } } catch (error) { console.error("Erreur lors de la récupération de l'ID IMDB:", error); playerContainer.innerHTML = ` <div class="flex flex-col items-center justify-center h-full text-red-400"> <i class="fas fa-exclamation-triangle text-4xl mb-4"></i> <p class="text-lg">Impossible de trouver l'ID IMDB pour ce film</p> <p class="text-sm text-gray-400 mt-2">Essayez avec un autre serveur</p> </div> `; return; } } // Construire l'URL de streaming en fonction du serveur sélectionné let streamingUrl; const serverConfig = STREAMING_SERVERS[selectedServer]; if (serverConfig.requiresTMDB) { streamingUrl = serverConfig.url + movieId; } else if (serverConfig.requiresIMDB && imdbId) { streamingUrl = serverConfig.url + imdbId; } else { // Si aucun ID n'est disponible, utiliser TMDB par défaut streamingUrl = serverConfig.url + movieId; } // Ajouter le paramètre de lecture automatique si pris en charge if (serverConfig.autoPlay) { streamingUrl += '/auto'; } // Créer l'iframe pour le lecteur vidéo const iframe = document.createElement('iframe'); iframe.id = 'streaming-player'; iframe.src = streamingUrl; iframe.setAttribute('allowfullscreen', ''); iframe.setAttribute('scrolling', 'no'); iframe.setAttribute('frameborder', '0'); iframe.setAttribute('marginwidth', '0'); iframe.setAttribute('marginheight', '0'); iframe.style.width = '100%'; iframe.style.height = '100%'; iframe.style.border = 'none'; // Gestion des erreurs de chargement iframe.onerror = function() { playerContainer.innerHTML = ` <div class="flex flex-col items-center justify-center h-full text-red-400"> <i class="fas fa-exclamation-triangle text-4xl mb-4"></i> <p class="text-lg">Erreur lors du chargement du flux vidéo</p> <p class="text-sm text-gray-400 mt-2">Le serveur peut être temporairement indisponible</p> <button onclick="tryAlternativeServer()" class="mt-4 px-4 py-2 bg-primary text-white rounded hover:bg-secondary transition"> <i class="fas fa-sync-alt mr-2"></i> Essayer un autre serveur </button> </div> `; }; // Remplacer le chargement par le lecteur playerContainer.innerHTML = ''; playerContainer.appendChild(iframe); // Mettre le focus sur la fenêtre de streaming streamingWindow.focus(); // Tentative de lecture automatique (peut être bloquée par le navigateur) setTimeout(() => { try { iframe.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*'); } catch (e) { console.log("Auto-play blocked by browser"); } }, 2000); } // Essayer un autre serveur en cas d'erreur function tryAlternativeServer() { const servers = Object.keys(STREAMING_SERVERS); const currentIndex = servers.indexOf(selectedServer); const nextIndex = (currentIndex + 1) % servers.length; selectedServer = servers[nextIndex]; startAutoStreaming(currentMovieId, document.getElementById('streaming-title').textContent); } // Fermer la fenêtre de streaming function closeStreamingWindow() { const playerContainer = document.getElementById('streaming-player-container'); playerContainer.innerHTML = ''; document.getElementById('streaming-window').classList.add('hidden'); } // Changer la qualité de streaming (simulé) function changeQuality(quality) { alert(`Qualité changée en ${quality}. Note: Ceci est une démonstration.`); // En réalité, vous devriez mettre à jour la source du lecteur vidéo } // Basculer en plein écran function toggleFullscreen() { const playerContainer = document.getElementById('streaming-player-container'); if (playerContainer.requestFullscreen) { playerContainer.requestFullscreen(); } else if (playerContainer.webkitRequestFullscreen) { playerContainer.webkitRequestFullscreen(); } else if (playerContainer.msRequestFullscreen) { playerContainer.msRequestFullscreen(); } } </script> <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" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html> film complet en francais
|
|
|
|
1 |
+
ajouter une base de donnée de 9787456 <!DOCTYPE html> <html lang="fr"> <head><script>window.huggingface={variables:{"SPACE_CREATOR_USER_ID":"681375e3264f6a6cf6562c83"}};</script> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>CineStream - Films avec streaming automatique</title> <script src="https://cdn.tailwindcss.com"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <script> tailwind.config = { theme: { extend: { colors: { primary: '#6d28d9', secondary: '#8b5cf6', dark: '#1e1b4b', light: '#f5f3ff', }, fontFamily: { sans: ['Inter', 'sans-serif'], }, } } } </script> <style> @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); body { font-family: 'Inter', sans-serif; background-color: #0f172a; color: white; } .movie-card { transition: all 0.3s ease; } .movie-card:hover { transform: translateY(-10px); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); } .movie-poster { height: 450px; object-fit: cover; } .loading-spinner { animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .gradient-text { background: linear-gradient(90deg, #8b5cf6, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; } .search-input:focus { box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.5); } .error-message { background-color: rgba(239, 68, 68, 0.2); border-left: 4px solid #ef4444; } .placeholder-poster { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); display: flex; align-items: center; justify-content: center; } /* Style pour le lecteur vidéo */ .video-container { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; overflow: hidden; } .video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; } /* Style pour les boutons de streaming */ .stream-btn { transition: all 0.2s ease; } .stream-btn:hover { transform: scale(1.05); } /* Style pour la fenêtre de streaming */ .streaming-window { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); z-index: 1000; display: flex; flex-direction: column; } .streaming-header { padding: 15px; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: space-between; align-items: center; } .streaming-content { flex: 1; display: flex; justify-content: center; align-items: center; } .streaming-controls { padding: 15px; background-color: rgba(0, 0, 0, 0.7); display: flex; justify-content: space-between; align-items: center; } /* Style pour la sélection de serveur */ .server-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; } .server-btn { padding: 8px 12px; border-radius: 20px; font-size: 14px; cursor: pointer; transition: all 0.2s; } .server-btn.active { background-color: #6d28d9; color: white; } .server-btn.inactive { background-color: #334155; color: #94a3b8; } /* Animation de chargement du streaming */ .stream-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; } .stream-loading-spinner { width: 50px; height: 50px; border: 5px solid rgba(255, 255, 255, 0.1); border-radius: 50%; border-top-color: #6d28d9; animation: spin 1s linear infinite; } </style> </head> <body class="min-h-screen"> <!-- Navigation --> <nav class="bg-gray-900 bg-opacity-90 backdrop-blur-md fixed w-full z-50 shadow-lg"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div class="flex items-center justify-between h-16"> <div class="flex items-center"> <div class="flex-shrink-0"> <span class="text-2xl font-bold gradient-text">CineStream</span> </div> <div class="hidden md:block ml-10"> <div class="flex space-x-4"> <a href="#" class="text-white px-3 py-2 rounded-md text-sm font-medium bg-primary">Accueil</a> <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Films</a> <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Séries</a> <a href="#" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Tendances</a> </div> </div> </div> <div class="hidden md:block"> <div class="ml-4 flex items-center md:ml-6"> <div class="relative mx-4"> <input type="text" id="search-input" placeholder="Rechercher un film..." 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"> <button onclick="searchMovies()" class="absolute right-3 top-2 text-gray-400 hover:text-white"> <i class="fas fa-search"></i> </button> </div> <button class="p-1 rounded-full text-gray-400 hover:text-white focus:outline-none"> <i class="fas fa-user-circle text-xl"></i> </button> </div> </div> <div class="-mr-2 flex md:hidden"> <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"> <i class="fas fa-bars"></i> </button> </div> </div> </div> </nav> <!-- Main Content --> <main class="pt-24 pb-12"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <!-- Featured Section --> <section class="mb-12"> <div class="flex justify-between items-center mb-6"> <h2 class="text-2xl font-bold text-white">Films populaires</h2> <div class="flex space-x-2"> <button onclick="filterMovies('popular')" class="px-4 py-1 rounded-full text-sm bg-primary text-white">Populaires</button> <button onclick="filterMovies('top_rated')" class="px-4 py-1 rounded-full text-sm bg-gray-700 text-white">Mieux notés</button> <button onclick="filterMovies('upcoming')" class="px-4 py-1 rounded-full text-sm bg-gray-700 text-white">Prochainement</button> </div> </div> <div id="movies-container" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6"> <!-- Movies will be loaded here --> <div class="flex justify-center items-center py-12 col-span-full"> <div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary loading-spinner"></div> </div> </div> <div id="load-more-container" class="mt-8 flex justify-center"> <button onclick="loadMoreMovies()" class="px-6 py-2 bg-primary text-white rounded-full hover:bg-secondary transition flex items-center"> <span>Voir plus</span> <i class="fas fa-chevron-down ml-2"></i> </button> </div> </section> <!-- Genres Section --> <section class="mb-12"> <h2 class="text-2xl font-bold text-white mb-6">Par genres</h2> <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4"> <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> <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> <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> <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> <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> <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> </div> </section> </div> </main> <!-- Footer --> <footer class="bg-gray-900 text-gray-400 py-8"> <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> <div class="grid grid-cols-1 md:grid-cols-4 gap-8"> <div> <h3 class="text-white text-lg font-semibold mb-4">CineStream</h3> <p class="text-sm">La meilleure plateforme pour regarder des films avec streaming automatique.</p> </div> <div> <h3 class="text-white text-lg font-semibold mb-4">Navigation</h3> <ul class="space-y-2 text-sm"> <li><a href="#" class="hover:text-white">Accueil</a></li> <li><a href="#" class="hover:text-white">Films</a></li> <li><a href="#" class="hover:text-white">Séries</a></li> <li><a href="#" class="hover:text-white">Nouveautés</a></li> </ul> </div> <div> <h3 class="text-white text-lg font-semibold mb-4">Légal</h3> <ul class="space-y-2 text-sm"> <li><a href="#" class="hover:text-white">Conditions d'utilisation</a></li> <li><a href="#" class="hover:text-white">Politique de confidentialité</a></li> <li><a href="#" class="hover:text-white">DMCA</a></li> </ul> </div> <div> <h3 class="text-white text-lg font-semibold mb-4">Contact</h3> <div class="flex space-x-4"> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-facebook-f"></i></a> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-instagram"></i></a> <a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-discord"></i></a> </div> </div> </div> <div class="border-t border-gray-800 mt-8 pt-8 text-sm text-center"> <p>© 2023 CineStream. Tous droits réservés.</p> </div> </div> </footer> <!-- Movie Details Modal --> <div id="movie-modal" class="fixed inset-0 z-50 hidden overflow-y-auto"> <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> <div class="fixed inset-0 transition-opacity" aria-hidden="true"> <div class="absolute inset-0 bg-gray-900 opacity-75"></div> </div> <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span> <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"> <div class="px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> <div class="sm:flex sm:items-start"> <div id="modal-poster" class="flex-shrink-0 w-full sm:w-1/3 mb-4 sm:mb-0 sm:mr-6"> <img class="w-full rounded-lg shadow-lg" src="" alt="Movie Poster"> </div> <div class="mt-3 text-center sm:mt-0 sm:text-left w-full sm:w-2/3"> <h3 id="modal-title" class="text-2xl leading-6 font-bold text-white mb-2"></h3> <div class="flex items-center mb-4"> <span id="modal-rating" class="bg-yellow-500 text-white text-xs font-semibold px-2 py-1 rounded mr-3"></span> <span id="modal-year" class="text-gray-300 text-sm"></span> <span id="modal-runtime" class="ml-3 text-gray-300 text-sm"></span> </div> <p id="modal-overview" class="text-gray-300 mb-4"></p> <div id="modal-genres" class="flex flex-wrap gap-2 mb-4"></div> <!-- Serveurs de streaming --> <div class="mb-4"> <h4 class="text-sm font-semibold text-gray-400 mb-2">CHOISIR UN SERVEUR :</h4> <div class="server-list"> <button onclick="selectServer('hdvip')" class="server-btn active" data-server="hdvip"> <i class="fas fa-crown mr-1"></i> HD VIP </button> <button onclick="selectServer('streamlare')" class="server-btn inactive" data-server="streamlare"> <i class="fas fa-play-circle mr-1"></i> Streamlare </button> <button onclick="selectServer('streamtape')" class="server-btn inactive" data-server="streamtape"> <i class="fas fa-tape mr-1"></i> Streamtape </button> <button onclick="selectServer('younetu')" class="server-btn inactive" data-server="younetu"> <i class="fas fa-film mr-1"></i> Younetu </button> <button onclick="selectServer('uptostream')" class="server-btn inactive" data-server="uptostream"> <i class="fas fa-cloud mr-1"></i> Uptostream </button> <button onclick="selectServer('vidsrc')" class="server-btn inactive" data-server="vidsrc"> <i class="fas fa-server mr-1"></i> VidSrc </button> </div> </div> <div class="mt-4"> <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"> Fermer </button> <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"> <i class="fas fa-play mr-2"></i> Lecture auto </button> </div> </div> </div> </div> </div> </div> </div> <!-- Streaming Window (hidden by default) --> <div id="streaming-window" class="streaming-window hidden"> <div class="streaming-header"> <h3 id="streaming-title" class="text-xl font-bold text-white"></h3> <button onclick="closeStreamingWindow()" class="text-gray-400 hover:text-white"> <i class="fas fa-times text-xl"></i> </button> </div> <div class="streaming-content"> <div id="streaming-player-container" class="w-full h-full" style="max-width: 1200px;"> <!-- Contenu du lecteur sera chargé ici --> <div id="stream-loading" class="stream-loading w-full h-full"> <div class="stream-loading-spinner"></div> <p class="text-gray-300">Chargement du flux vidéo...</p> </div> </div> </div> <div class="streaming-controls"> <div class="flex space-x-2"> <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> <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> <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> </div> <div> <button onclick="toggleFullscreen()" class="stream-btn px-3 py-1 bg-gray-700 hover:bg-gray-600 text-white rounded-full text-sm"> <i class="fas fa-expand mr-1"></i> Plein écran </button> </div> </div> </div> <script> // Configuration const API_KEY = 'c45a857c193f6302f2b5061c3b85e743'; // Clé API TMDB valide const BASE_URL = 'https://api.themoviedb.org/3'; // Serveurs de streaming avec URLs de base fonctionnelles const STREAMING_SERVERS = { hdvip: { name: 'Lecteur HD VIP', url: 'https://database.gdriveplayer.us/player.php?tmdb=', autoPlay: true, requiresTMDB: true, requiresIMDB: false }, streamlare: { name: 'Streamlare', url: 'https://streamlare.com/e/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, streamtape: { name: 'Streamtape', url: 'https://streamtape.com/e/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, younetu: { name: 'Younetu', url: 'https://younetu.com/embed/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, uptostream: { name: 'Uptostream', url: 'https://uptostream.com/iframe/', autoPlay: true, requiresTMDB: false, requiresIMDB: true }, vidsrc: { name: 'VidSrc', url: 'https://vidsrc.to/embed/movie/', autoPlay: true, requiresTMDB: true, requiresIMDB: false } }; let currentPage = 1; let currentFilter = 'popular'; let currentGenre = null; let currentSearch = ''; let totalPages = 1; let isLoading = false; let currentMovieId = null; let currentIMDBId = null; let selectedServer = 'hdvip'; // Fonction utilitaire pour faire les requêtes API async function fetchAPI(endpoint, params = {}) { const url = new URL(`${BASE_URL}${endpoint}`); // Ajouter les paramètres par défaut const defaultParams = { language: 'fr-FR', page: currentPage, api_key: API_KEY }; // Fusionner les paramètres const queryParams = {...defaultParams, ...params}; // Ajouter les paramètres à l'URL Object.keys(queryParams).forEach(key => { if (queryParams[key] !== undefined && queryParams[key] !== null) { url.searchParams.append(key, queryParams[key]); } }); try { const response = await fetch(url); if (!response.ok) { throw new Error(`Erreur HTTP: ${response.status}`); } return await response.json(); } catch (error) { console.error('Erreur API:', error); throw error; } } // Charger les films au démarrage document.addEventListener('DOMContentLoaded', function() { loadMovies(); // Écouter la touche Entrée dans la recherche document.getElementById('search-input').addEventListener('keypress', function(e) { if (e.key === 'Enter') { searchMovies(); } }); }); // Charger les films async function loadMovies() { if (isLoading) return; isLoading = true; showLoadingState(); try { let data; if (currentSearch) { data = await fetchAPI('/search/movie', { query: currentSearch, include_adult: false, page: currentPage }); } else if (currentGenre) { data = await fetchAPI('/discover/movie', { include_adult: false, include_video: false, sort_by: 'popularity.desc', with_genres: currentGenre, page: currentPage }); } else { data = await fetchAPI(`/movie/${currentFilter}`, { page: currentPage }); } totalPages = data.total_pages || 1; if (currentPage === 1) { document.getElementById('movies-container').innerHTML = ''; } if (data.results && data.results.length > 0) { displayMovies(data.results); updateLoadMoreButton(); } else { showNoResults(); } } catch (error) { console.error('Error fetching movies:', error); showErrorState(error.message); } finally { isLoading = false; } } // Afficher l'état de chargement function showLoadingState() { const container = document.getElementById('movies-container'); container.innerHTML = ` <div class="flex justify-center items-center py-12 col-span-full"> <div class="animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-primary loading-spinner"></div> </div> `; } // Afficher les films avec boutons de streaming function displayMovies(movies) { const container = document.getElementById('movies-container'); movies.forEach(movie => { const movieCard = document.createElement('div'); movieCard.className = 'movie-card bg-gray-800 rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-all duration-300'; // Utiliser l'image originale en haute qualité si disponible const posterPath = movie.poster_path ? `https://image.tmdb.org/t/p/w500${movie.poster_path}` : 'https://via.placeholder.com/500x750?text=Affiche+non+disponible'; movieCard.innerHTML = ` <div> <div class="movie-poster w-full rounded-t-lg overflow-hidden ${!movie.poster_path ? 'placeholder-poster' : ''}"> <img src="${posterPath}" alt="${movie.title || 'Titre inconnu'}" class="w-full h-full object-cover" onerror="this.src='https://via.placeholder.com/500x750?text=Image+non+chargée'; this.classList.add('placeholder-poster')"> </div> <div class="p-4"> <h3 class="text-lg font-semibold text-white truncate">${movie.title || 'Titre inconnu'}</h3> <div class="flex items-center mt-2"> <span class="text-yellow-400 text-sm"> <i class="fas fa-star"></i> ${movie.vote_average ? movie.vote_average.toFixed(1) : 'N/A'} </span> <span class="text-gray-400 text-sm ml-auto">${movie.release_date ? movie.release_date.substring(0, 4) : 'N/A'}</span> </div> <div class="mt-3"> <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"> <i class="fas fa-play-circle mr-1"></i> Lecture auto </button> <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"> <i class="fas fa-info-circle mr-1"></i> Détails </button> </div> </div> </div> `; container.appendChild(movieCard); }); } // Afficher un message d'erreur function showErrorState(errorMessage) { const container = document.getElementById('movies-container'); container.innerHTML = ` <div class="col-span-full py-6 px-4 error-message rounded-lg"> <div class="flex items-center"> <i class="fas fa-exclamation-triangle text-red-500 text-xl mr-3"></i> <div> <h3 class="text-lg font-medium text-white">Erreur lors du chargement des films</h3> <p class="text-gray-300 mt-1">${errorMessage || 'Veuillez réessayer plus tard'}</p> <button onclick="retryLoading()" class="mt-3 px-4 py-2 bg-primary text-white rounded-full hover:bg-secondary transition text-sm"> <i class="fas fa-sync-alt mr-2"></i> Réessayer </button> </div> </div> </div> `; document.getElementById('load-more-container').classList.add('hidden'); } // Afficher un message quand aucun résultat n'est trouvé function showNoResults() { const container = document.getElementById('movies-container'); container.innerHTML = ` <div class="col-span-full text-center py-12"> <i class="fas fa-film text-4xl text-gray-500 mb-4"></i> <h3 class="text-xl text-white">Aucun film trouvé</h3> <p class="text-gray-400 mt-2">Essayez avec d'autres critères de recherche</p> </div> `; document.getElementById('load-more-container').classList.add('hidden'); } // Réessayer le chargement function retryLoading() { currentPage = 1; loadMovies(); } // Mettre à jour le bouton "Voir plus" function updateLoadMoreButton() { const loadMoreContainer = document.getElementById('load-more-container'); if (currentPage >= totalPages) { loadMoreContainer.innerHTML = ` <p class="text-gray-400">Vous avez atteint la fin des résultats</p> `; } else { loadMoreContainer.classList.remove('hidden'); } } // Filtrer les films function filterMovies(filter) { currentFilter = filter; currentGenre = null; currentSearch = ''; currentPage = 1; document.getElementById('search-input').value = ''; loadMovies(); // Mettre à jour les boutons actifs document.querySelectorAll('button').forEach(btn => { if (btn.textContent.toLowerCase().includes(filter.replace('_', ' '))) { btn.classList.remove('bg-gray-700'); btn.classList.add('bg-primary'); } else { btn.classList.remove('bg-primary'); btn.classList.add('bg-gray-700'); } }); } // Filtrer par genre function filterByGenre(genreId) { currentGenre = genreId; currentSearch = ''; currentPage = 1; document.getElementById('search-input').value = ''; loadMovies(); // Mettre à jour les boutons actifs document.querySelectorAll('.genre-btn').forEach(btn => { btn.classList.remove('bg-primary'); if (btn.onclick.toString().includes(genreId.toString())) { btn.classList.add('bg-primary'); } }); } // Rechercher des films function searchMovies() { const query = document.getElementById('search-input').value.trim(); if (query) { currentSearch = query; currentGenre = null; currentPage = 1; loadMovies(); } } // Charger plus de films function loadMoreMovies() { if (currentPage < totalPages) { currentPage++; loadMovies(); } } // Afficher les détails du film async function showMovieDetails(movieId) { try { const movie = await fetchAPI(`/movie/${movieId}`); currentMovieId = movieId; // Récupérer l'ID IMDB si disponible if (movie.imdb_id) { currentIMDBId = movie.imdb_id; } else { // Si l'ID IMDB n'est pas disponible, essayer de le récupérer via l'API const externalIds = await fetchAPI(`/movie/${movieId}/external_ids`); currentIMDBId = externalIds.imdb_id || null; } // Remplir la modal const modalPoster = document.querySelector('#modal-poster img'); modalPoster.src = movie.poster_path ? `https://image.tmdb.org/t/p/w500${movie.poster_path}` : 'https://via.placeholder.com/500x750?text=Affiche+non+disponible'; modalPoster.onerror = function() { this.src = 'https://via.placeholder.com/500x750?text=Image+non+chargée'; }; document.getElementById('modal-title').textContent = movie.title || 'Titre inconnu'; document.getElementById('modal-rating').textContent = `${movie.vote_average ? movie.vote_average.toFixed(1) : 'N/A'}/10`; document.getElementById('modal-year').textContent = movie.release_date ? movie.release_date.substring(0, 4) : 'N/A'; document.getElementById('modal-runtime').textContent = movie.runtime ? `${movie.runtime} min` : ''; document.getElementById('modal-overview').textContent = movie.overview || 'Aucun synopsis disponible.'; // Afficher les genres const genresContainer = document.getElementById('modal-genres'); genresContainer.innerHTML = ''; if (movie.genres && movie.genres.length > 0) { movie.genres.forEach(genre => { const genreBadge = document.createElement('span'); genreBadge.className = 'bg-gray-700 text-white text-xs px-2 py-1 rounded'; genreBadge.textContent = genre.name; genresContainer.appendChild(genreBadge); }); } else { genresContainer.innerHTML = '<span class="text-gray-400 text-sm">Aucun genre spécifié</span>'; } // Afficher la modal document.getElementById('movie-modal').classList.remove('hidden'); } catch (error) { console.error('Error fetching movie details:', error); alert('Erreur lors du chargement des détails du film: ' + (error.message || 'Veuillez réessayer')); } } // Fermer la modal de détails function closeModal() { document.getElementById('movie-modal').classList.add('hidden'); } // Sélectionner un serveur de streaming function selectServer(serverId) { selectedServer = serverId; // Mettre à jour l'état des boutons document.querySelectorAll('.server-btn').forEach(btn => { if (btn.dataset.server === serverId) { btn.classList.remove('inactive'); btn.classList.add('active'); } else { btn.classList.remove('active'); btn.classList.add('inactive'); } }); } // Démarrer le streaming depuis la modal function startStreaming() { if (currentMovieId) { const movieTitle = document.getElementById('modal-title').textContent; startAutoStreaming(currentMovieId, movieTitle); closeModal(); } } // Démarrer le streaming automatique dans une nouvelle fenêtre async function startAutoStreaming(movieId, movieTitle) { currentMovieId = movieId; // Afficher la fenêtre de streaming const streamingWindow = document.getElementById('streaming-window'); document.getElementById('streaming-title').textContent = movieTitle; // Afficher l'état de chargement const playerContainer = document.getElementById('streaming-player-container'); playerContainer.innerHTML = ` <div id="stream-loading" class="stream-loading w-full h-full"> <div class="stream-loading-spinner"></div> <p class="text-gray-300">Chargement du flux vidéo...</p> </div> `; // Afficher la fenêtre de streaming streamingWindow.classList.remove('hidden'); // Récupérer les informations du film pour l'ID IMDB si nécessaire let imdbId = currentIMDBId; if (!imdbId && STREAMING_SERVERS[selectedServer].requiresIMDB) { try { const externalIds = await fetchAPI(`/movie/${movieId}/external_ids`); imdbId = externalIds.imdb_id; if (!imdbId) { throw new Error("ID IMDB non disponible"); } } catch (error) { console.error("Erreur lors de la récupération de l'ID IMDB:", error); playerContainer.innerHTML = ` <div class="flex flex-col items-center justify-center h-full text-red-400"> <i class="fas fa-exclamation-triangle text-4xl mb-4"></i> <p class="text-lg">Impossible de trouver l'ID IMDB pour ce film</p> <p class="text-sm text-gray-400 mt-2">Essayez avec un autre serveur</p> </div> `; return; } } // Construire l'URL de streaming en fonction du serveur sélectionné let streamingUrl; const serverConfig = STREAMING_SERVERS[selectedServer]; if (serverConfig.requiresTMDB) { streamingUrl = serverConfig.url + movieId; } else if (serverConfig.requiresIMDB && imdbId) { streamingUrl = serverConfig.url + imdbId; } else { // Si aucun ID n'est disponible, utiliser TMDB par défaut streamingUrl = serverConfig.url + movieId; } // Ajouter le paramètre de lecture automatique si pris en charge if (serverConfig.autoPlay) { streamingUrl += '/auto'; } // Créer l'iframe pour le lecteur vidéo const iframe = document.createElement('iframe'); iframe.id = 'streaming-player'; iframe.src = streamingUrl; iframe.setAttribute('allowfullscreen', ''); iframe.setAttribute('scrolling', 'no'); iframe.setAttribute('frameborder', '0'); iframe.setAttribute('marginwidth', '0'); iframe.setAttribute('marginheight', '0'); iframe.style.width = '100%'; iframe.style.height = '100%'; iframe.style.border = 'none'; // Gestion des erreurs de chargement iframe.onerror = function() { playerContainer.innerHTML = ` <div class="flex flex-col items-center justify-center h-full text-red-400"> <i class="fas fa-exclamation-triangle text-4xl mb-4"></i> <p class="text-lg">Erreur lors du chargement du flux vidéo</p> <p class="text-sm text-gray-400 mt-2">Le serveur peut être temporairement indisponible</p> <button onclick="tryAlternativeServer()" class="mt-4 px-4 py-2 bg-primary text-white rounded hover:bg-secondary transition"> <i class="fas fa-sync-alt mr-2"></i> Essayer un autre serveur </button> </div> `; }; // Remplacer le chargement par le lecteur playerContainer.innerHTML = ''; playerContainer.appendChild(iframe); // Mettre le focus sur la fenêtre de streaming streamingWindow.focus(); // Tentative de lecture automatique (peut être bloquée par le navigateur) setTimeout(() => { try { iframe.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*'); } catch (e) { console.log("Auto-play blocked by browser"); } }, 2000); } // Essayer un autre serveur en cas d'erreur function tryAlternativeServer() { const servers = Object.keys(STREAMING_SERVERS); const currentIndex = servers.indexOf(selectedServer); const nextIndex = (currentIndex + 1) % servers.length; selectedServer = servers[nextIndex]; startAutoStreaming(currentMovieId, document.getElementById('streaming-title').textContent); } // Fermer la fenêtre de streaming function closeStreamingWindow() { const playerContainer = document.getElementById('streaming-player-container'); playerContainer.innerHTML = ''; document.getElementById('streaming-window').classList.add('hidden'); } // Changer la qualité de streaming (simulé) function changeQuality(quality) { alert(`Qualité changée en ${quality}. Note: Ceci est une démonstration.`); // En réalité, vous devriez mettre à jour la source du lecteur vidéo } // Basculer en plein écran function toggleFullscreen() { const playerContainer = document.getElementById('streaming-player-container'); if (playerContainer.requestFullscreen) { playerContainer.requestFullscreen(); } else if (playerContainer.webkitRequestFullscreen) { playerContainer.webkitRequestFullscreen(); } else if (playerContainer.msRequestFullscreen) { playerContainer.msRequestFullscreen(); } } </script> <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" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> </html> film complet en francais
|
2 |
+
je veux pas de pub , je veux la lecture démarre rappidement ajouter plussieur vrais serveur
|