Spaces:
Running
Running
Add 2 files
Browse files- index.html +427 -230
- prompts.txt +3 -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>CinéVerse - 20,500 Films Complets</title>
|
7 |
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
<style>
|
@@ -172,6 +172,83 @@
|
|
172 |
opacity: 1;
|
173 |
pointer-events: all;
|
174 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
175 |
</style>
|
176 |
</head>
|
177 |
<body>
|
@@ -233,8 +310,8 @@
|
|
233 |
<button id="playFeaturedMovie" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-8 rounded-full text-lg flex items-center justify-center transition duration-300 transform hover:scale-105">
|
234 |
<i class="fas fa-play mr-2"></i> Commencer à regarder
|
235 |
</button>
|
236 |
-
<button class="bg-
|
237 |
-
<i class="fas fa-
|
238 |
</button>
|
239 |
</div>
|
240 |
</div>
|
@@ -395,8 +472,8 @@
|
|
395 |
<button id="playMovieBtn" class="bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-6 rounded-full flex items-center">
|
396 |
<i class="fas fa-play mr-2"></i> Regarder
|
397 |
</button>
|
398 |
-
<button class="bg-
|
399 |
-
<i class="fas fa-
|
400 |
</button>
|
401 |
</div>
|
402 |
</div>
|
@@ -417,6 +494,25 @@
|
|
417 |
<iframe id="movieFrame" frameborder="0" allowfullscreen allow="autoplay; fullscreen"></iframe>
|
418 |
</div>
|
419 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
</div>
|
421 |
|
422 |
<!-- Loading Overlay -->
|
@@ -488,152 +584,175 @@
|
|
488 |
</footer>
|
489 |
|
490 |
<script>
|
491 |
-
//
|
492 |
-
const
|
493 |
-
const
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
|
513 |
-
for (let
|
514 |
-
const
|
515 |
-
|
516 |
-
|
517 |
-
// Create a unique movie by modifying some details
|
518 |
-
const movie = {
|
519 |
-
id: originalMovie.id * 100 + (i % 100), // Make IDs unique
|
520 |
-
title: originalMovie.title,
|
521 |
-
original_title: originalMovie.original_title,
|
522 |
-
overview: originalMovie.overview,
|
523 |
-
poster_path: originalMovie.poster_path,
|
524 |
-
backdrop_path: originalMovie.backdrop_path,
|
525 |
-
release_date: originalMovie.release_date,
|
526 |
-
vote_average: originalMovie.vote_average,
|
527 |
-
vote_count: originalMovie.vote_count,
|
528 |
-
genre_ids: originalMovie.genre_ids,
|
529 |
-
popularity: originalMovie.popularity,
|
530 |
-
video: originalMovie.video,
|
531 |
-
adult: originalMovie.adult,
|
532 |
-
// Add our own fields
|
533 |
-
duration: `${Math.floor(Math.random() * 2) + 1}h ${Math.floor(Math.random() * 60)}min`,
|
534 |
-
director: getRandomDirector(),
|
535 |
-
cast: getRandomCast(),
|
536 |
-
language: 'Français',
|
537 |
-
isFeatured: i < 20,
|
538 |
-
isTrending: i >= 20 && i < 40,
|
539 |
-
isPopular: i >= 40 && i < 60
|
540 |
-
};
|
541 |
-
|
542 |
-
// Make some variations to titles for uniqueness
|
543 |
-
if (i >= popularMovies.length) {
|
544 |
-
const suffixes = ['Le Retour', 'La Revanche', 'L\'Héritage', 'La Fin', 'Le Commencement'];
|
545 |
-
const suffix = suffixes[Math.floor(Math.random() * suffixes.length)];
|
546 |
-
movie.title = `${originalMovie.title} : ${suffix}`;
|
547 |
}
|
548 |
-
|
549 |
-
movies.push(movie);
|
550 |
}
|
551 |
|
552 |
-
|
553 |
-
|
554 |
-
|
|
|
|
|
555 |
|
556 |
-
//
|
557 |
-
const
|
558 |
-
const
|
559 |
-
|
560 |
-
|
561 |
-
'Goodfellas', 'The Silence of the Lambs', 'Saving Private Ryan'
|
562 |
-
];
|
563 |
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
director: getRandomDirector(),
|
580 |
-
cast: getRandomCast(),
|
581 |
-
language: 'Français',
|
582 |
-
isFeatured: i < 20,
|
583 |
-
isTrending: i >= 20 && i < 40,
|
584 |
-
isPopular: i >= 40 && i < 60
|
585 |
-
});
|
586 |
}
|
587 |
|
588 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
}
|
|
|
|
|
590 |
};
|
591 |
|
592 |
-
//
|
593 |
-
|
594 |
-
const firstNames = ['Christopher', 'Steven', 'Martin', 'Quentin', 'David', 'James', 'Peter', 'Ridley'];
|
595 |
-
const lastNames = ['Nolan', 'Spielberg', 'Scorsese', 'Tarantino', 'Fincher', 'Cameron', 'Jackson', 'Scott'];
|
596 |
-
return `${firstNames[Math.floor(Math.random() * firstNames.length)]} ${lastNames[Math.floor(Math.random() * lastNames.length)]}`;
|
597 |
-
}
|
598 |
|
599 |
-
|
600 |
-
const firstNames = ['Leonardo', 'Christian', 'Tom', 'Brad', 'Matt', 'Robert', 'Johnny', 'Will'];
|
601 |
-
const lastNames = ['DiCaprio', 'Bale', 'Hanks', 'Pitt', 'Damon', 'Downey Jr.', 'Depp', 'Smith'];
|
602 |
-
const actors = [];
|
603 |
-
|
604 |
-
for (let i = 0; i < 3; i++) {
|
605 |
-
actors.push(`${firstNames[Math.floor(Math.random() * firstNames.length)]} ${lastNames[Math.floor(Math.random() * lastNames.length)]}`);
|
606 |
-
}
|
607 |
-
|
608 |
-
return actors.join(', ');
|
609 |
-
}
|
610 |
-
|
611 |
-
// Generate movie cards HTML
|
612 |
const generateMovieCard = (movie) => {
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
|
617 |
return `
|
618 |
-
<div class="movie-card relative rounded-lg overflow-hidden transition duration-300">
|
619 |
<img src="${posterUrl}" alt="${movie.title}" class="w-full h-auto object-cover">
|
620 |
<div class="absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 hover:opacity-100 transition duration-300 flex flex-col justify-end p-4">
|
621 |
<h3 class="text-white font-bold">${movie.title}</h3>
|
622 |
<div class="flex items-center text-sm text-gray-300 mt-1">
|
623 |
-
<span>${movie.release_date
|
624 |
<span class="mx-2">•</span>
|
625 |
<span>${movie.duration}</span>
|
626 |
</div>
|
627 |
<div class="flex mt-2">
|
628 |
-
${movie.
|
629 |
-
`<span class="text-xs bg-gray-800/80 text-white px-2 py-1 rounded mr-1"
|
630 |
-
).join('')
|
631 |
</div>
|
632 |
<div class="flex items-center mt-2">
|
633 |
<div class="rating-stars text-sm mr-2">
|
634 |
-
${
|
635 |
</div>
|
636 |
-
<span class="text-xs text-gray-300">${movie.vote_average
|
637 |
</div>
|
638 |
<div class="absolute inset-0 flex items-center justify-center">
|
639 |
<button class="play-icon opacity-0 absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-purple-600 hover:bg-purple-700 text-white rounded-full w-12 h-12 flex items-center justify-center transition duration-300"
|
@@ -646,42 +765,43 @@
|
|
646 |
`;
|
647 |
};
|
648 |
|
649 |
-
//
|
650 |
-
const
|
651 |
-
|
652 |
-
|
653 |
-
: 'https://via.placeholder.com/500x750?text=No+Poster';
|
654 |
|
655 |
-
// Update modal content
|
656 |
document.getElementById('modalPoster').src = posterUrl;
|
657 |
document.getElementById('modalPoster').alt = movie.title;
|
658 |
document.getElementById('modalTitle').textContent = movie.title;
|
659 |
-
document.getElementById('modalRating').textContent = movie.vote_average
|
660 |
-
document.getElementById('modalYear').textContent = movie.release_date
|
661 |
document.getElementById('modalDuration').textContent = movie.duration;
|
662 |
-
document.getElementById('modalOverview').textContent = movie.overview
|
663 |
-
document.getElementById('modalDirector').textContent = movie.director
|
664 |
-
document.getElementById('modalCast').textContent = movie.cast
|
665 |
|
666 |
-
//
|
667 |
const genresContainer = document.getElementById('modalGenres');
|
668 |
genresContainer.innerHTML = '';
|
669 |
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
genresContainer.appendChild(genre);
|
677 |
-
}
|
678 |
|
679 |
-
//
|
680 |
document.getElementById('playMovieBtn').setAttribute('data-movie-id', movie.id);
|
|
|
|
|
|
|
|
|
|
|
681 |
};
|
682 |
|
683 |
-
//
|
684 |
-
const playMovie = (movieId) => {
|
685 |
const movie = movieDatabase.find(m => m.id === movieId);
|
686 |
if (!movie) return;
|
687 |
|
@@ -689,86 +809,147 @@
|
|
689 |
const movieFrame = document.getElementById('movieFrame');
|
690 |
const loadingOverlay = document.getElementById('loadingOverlay');
|
691 |
|
692 |
-
//
|
693 |
loadingOverlay.classList.remove('hidden');
|
694 |
-
|
695 |
-
// In a real app, you would use the actual movie video URL
|
696 |
-
// For demo, we'll use a placeholder YouTube trailer
|
697 |
-
const trailerId = 'kOHB85vDuow'; // Default trailer ID
|
698 |
-
movieFrame.src = `https://www.youtube.com/embed/${trailerId}?autoplay=1&mute=1&enablejsapi=1`;
|
699 |
-
|
700 |
-
// Show video player
|
701 |
videoPlayer.classList.remove('hidden');
|
702 |
document.body.style.overflow = 'hidden';
|
703 |
|
704 |
-
//
|
705 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
706 |
setTimeout(() => {
|
707 |
loadingOverlay.classList.add('hidden');
|
708 |
}, 1000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
709 |
};
|
|
|
|
|
|
|
|
|
|
|
710 |
|
711 |
-
//
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
717 |
};
|
718 |
|
719 |
-
//
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
|
724 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
725 |
const newReleases = movieDatabase.filter(m => m.isFeatured);
|
726 |
const trending = movieDatabase.filter(m => m.isTrending);
|
727 |
const popularMovies = movieDatabase.filter(m => m.isPopular);
|
728 |
|
729 |
-
//
|
730 |
const loadMoviesIntoGrid = (gridElement, movies, itemsPerPage = 20) => {
|
731 |
-
// Clear existing content
|
732 |
gridElement.innerHTML = '';
|
733 |
|
734 |
-
// Add actual movies
|
735 |
movies.slice(0, itemsPerPage).forEach(movie => {
|
736 |
const card = document.createElement('div');
|
737 |
card.innerHTML = generateMovieCard(movie);
|
738 |
gridElement.appendChild(card);
|
739 |
|
740 |
-
//
|
741 |
card.addEventListener('click', function() {
|
742 |
-
|
743 |
-
document.getElementById('movieModal').classList.add('active');
|
744 |
-
document.body.style.overflow = 'hidden';
|
745 |
-
});
|
746 |
-
});
|
747 |
-
|
748 |
-
// Add event listeners to play buttons
|
749 |
-
document.querySelectorAll('.play-icon').forEach(button => {
|
750 |
-
button.addEventListener('click', function(e) {
|
751 |
-
e.stopPropagation();
|
752 |
-
const movieId = parseInt(this.getAttribute('data-movie-id'));
|
753 |
-
playMovie(movieId);
|
754 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
755 |
});
|
756 |
};
|
757 |
|
758 |
-
//
|
759 |
loadMoviesIntoGrid(document.getElementById('newReleasesGrid'), newReleases);
|
760 |
loadMoviesIntoGrid(document.getElementById('trendingGrid'), trending);
|
761 |
loadMoviesIntoGrid(document.getElementById('popularMoviesGrid'), popularMovies);
|
762 |
|
763 |
-
//
|
764 |
-
loadMoviesIntoGrid(document.getElementById('fullCatalogGrid'), movieDatabase, 40);
|
765 |
|
766 |
-
//
|
767 |
document.getElementById('playFeaturedMovie').addEventListener('click', function() {
|
768 |
playMovie(movieDatabase[0].id);
|
769 |
});
|
770 |
|
771 |
-
//
|
|
|
|
|
|
|
|
|
|
|
772 |
let currentPage = 1;
|
773 |
const itemsPerPage = 40;
|
774 |
document.getElementById('loadMoreButton').addEventListener('click', function() {
|
@@ -776,66 +957,86 @@
|
|
776 |
const startIndex = (currentPage - 1) * itemsPerPage;
|
777 |
const endIndex = startIndex + itemsPerPage;
|
778 |
|
779 |
-
//
|
780 |
const button = this;
|
781 |
button.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Chargement...';
|
782 |
button.disabled = true;
|
783 |
|
784 |
-
//
|
785 |
setTimeout(() => {
|
786 |
-
//
|
787 |
movieDatabase.slice(startIndex, endIndex).forEach(movie => {
|
788 |
const card = document.createElement('div');
|
789 |
card.innerHTML = generateMovieCard(movie);
|
790 |
document.getElementById('fullCatalogGrid').appendChild(card);
|
791 |
|
792 |
-
//
|
793 |
card.addEventListener('click', function() {
|
794 |
-
|
795 |
-
document.getElementById('movieModal').classList.add('active');
|
796 |
-
document.body.style.overflow = 'hidden';
|
797 |
});
|
798 |
});
|
799 |
|
800 |
-
//
|
801 |
button.textContent = 'Charger plus de films';
|
802 |
button.disabled = false;
|
803 |
|
804 |
-
//
|
805 |
if (endIndex >= movieDatabase.length) {
|
806 |
button.style.display = 'none';
|
807 |
}
|
808 |
}, 800);
|
809 |
});
|
810 |
|
811 |
-
//
|
812 |
document.getElementById('searchButton').addEventListener('click', function() {
|
813 |
const searchTerm = document.getElementById('searchInput').value.toLowerCase();
|
814 |
if (searchTerm.trim() === '') return;
|
815 |
|
816 |
const results = movieDatabase.filter(movie =>
|
817 |
movie.title.toLowerCase().includes(searchTerm) ||
|
818 |
-
|
819 |
-
).slice(0, 100); //
|
820 |
|
821 |
-
//
|
822 |
loadMoviesIntoGrid(document.getElementById('fullCatalogGrid'), results);
|
823 |
});
|
824 |
|
825 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
826 |
document.getElementById('closeModal').addEventListener('click', function() {
|
827 |
document.getElementById('movieModal').classList.remove('active');
|
828 |
document.body.style.overflow = '';
|
829 |
});
|
830 |
|
831 |
-
//
|
832 |
document.getElementById('playMovieBtn').addEventListener('click', function() {
|
833 |
const movieId = parseInt(this.getAttribute('data-movie-id'));
|
834 |
document.getElementById('movieModal').classList.remove('active');
|
835 |
playMovie(movieId);
|
836 |
});
|
837 |
|
838 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
839 |
document.getElementById('scrollToTop').addEventListener('click', function() {
|
840 |
window.scrollTo({
|
841 |
top: 0,
|
@@ -843,7 +1044,7 @@
|
|
843 |
});
|
844 |
});
|
845 |
|
846 |
-
//
|
847 |
window.addEventListener('scroll', function() {
|
848 |
const scrollToTopBtn = document.getElementById('scrollToTop');
|
849 |
if (window.pageYOffset > 300) {
|
@@ -853,31 +1054,27 @@
|
|
853 |
}
|
854 |
});
|
855 |
|
856 |
-
//
|
857 |
-
|
858 |
-
|
859 |
-
const firstScriptTag = document.getElementsByTagName('script')[0];
|
860 |
-
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
|
861 |
-
});
|
862 |
-
|
863 |
-
// YouTube Player API (for more control over the player)
|
864 |
-
let player;
|
865 |
-
function onYouTubeIframeAPIReady() {
|
866 |
-
player = new YT.Player('movieFrame', {
|
867 |
-
events: {
|
868 |
-
'onReady': onPlayerReady,
|
869 |
-
'onStateChange': onPlayerStateChange
|
870 |
-
}
|
871 |
});
|
872 |
-
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
881 |
</script>
|
882 |
<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/streamvista" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
883 |
</html>
|
|
|
3 |
<head>
|
4 |
<meta charset="UTF-8">
|
5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>CinéVerse - 20,500 Films Complets - Mode 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 |
<style>
|
|
|
172 |
opacity: 1;
|
173 |
pointer-events: all;
|
174 |
}
|
175 |
+
|
176 |
+
/* Video quality selector */
|
177 |
+
.quality-selector {
|
178 |
+
position: absolute;
|
179 |
+
bottom: 20px;
|
180 |
+
right: 20px;
|
181 |
+
z-index: 60;
|
182 |
+
background: rgba(0, 0, 0, 0.7);
|
183 |
+
border-radius: 4px;
|
184 |
+
overflow: hidden;
|
185 |
+
}
|
186 |
+
|
187 |
+
.quality-btn {
|
188 |
+
display: block;
|
189 |
+
padding: 8px 12px;
|
190 |
+
color: white;
|
191 |
+
background: transparent;
|
192 |
+
border: none;
|
193 |
+
cursor: pointer;
|
194 |
+
text-align: left;
|
195 |
+
width: 100%;
|
196 |
+
}
|
197 |
+
|
198 |
+
.quality-btn:hover {
|
199 |
+
background: rgba(255, 255, 255, 0.1);
|
200 |
+
}
|
201 |
+
|
202 |
+
/* Auto-play notification */
|
203 |
+
.autoplay-notification {
|
204 |
+
position: fixed;
|
205 |
+
bottom: 20px;
|
206 |
+
left: 20px;
|
207 |
+
background: rgba(0, 0, 0, 0.7);
|
208 |
+
color: white;
|
209 |
+
padding: 10px 15px;
|
210 |
+
border-radius: 4px;
|
211 |
+
z-index: 100;
|
212 |
+
display: none;
|
213 |
+
}
|
214 |
+
|
215 |
+
/* Auto-play controls */
|
216 |
+
.autoplay-controls {
|
217 |
+
position: fixed;
|
218 |
+
bottom: 20px;
|
219 |
+
left: 50%;
|
220 |
+
transform: translateX(-50%);
|
221 |
+
background: rgba(0, 0, 0, 0.7);
|
222 |
+
color: white;
|
223 |
+
padding: 10px 15px;
|
224 |
+
border-radius: 4px;
|
225 |
+
z-index: 100;
|
226 |
+
display: flex;
|
227 |
+
gap: 10px;
|
228 |
+
}
|
229 |
+
|
230 |
+
.autoplay-btn {
|
231 |
+
background: #4f46e5;
|
232 |
+
border: none;
|
233 |
+
color: white;
|
234 |
+
padding: 5px 10px;
|
235 |
+
border-radius: 4px;
|
236 |
+
cursor: pointer;
|
237 |
+
font-size: 14px;
|
238 |
+
}
|
239 |
+
|
240 |
+
.autoplay-btn:hover {
|
241 |
+
background: #6366f1;
|
242 |
+
}
|
243 |
+
|
244 |
+
.autoplay-speed {
|
245 |
+
background: #1e293b;
|
246 |
+
border: none;
|
247 |
+
color: white;
|
248 |
+
padding: 5px;
|
249 |
+
border-radius: 4px;
|
250 |
+
cursor: pointer;
|
251 |
+
}
|
252 |
</style>
|
253 |
</head>
|
254 |
<body>
|
|
|
310 |
<button id="playFeaturedMovie" class="bg-purple-600 hover:bg-purple-700 text-white font-bold py-3 px-8 rounded-full text-lg flex items-center justify-center transition duration-300 transform hover:scale-105">
|
311 |
<i class="fas fa-play mr-2"></i> Commencer à regarder
|
312 |
</button>
|
313 |
+
<button id="startAutoplay" class="bg-green-600 hover:bg-green-700 text-white font-bold py-3 px-8 rounded-full text-lg flex items-center justify-center transition duration-300 transform hover:scale-105">
|
314 |
+
<i class="fas fa-bolt mr-2"></i> Mode Automatique
|
315 |
</button>
|
316 |
</div>
|
317 |
</div>
|
|
|
472 |
<button id="playMovieBtn" class="bg-purple-600 hover:bg-purple-700 text-white font-medium py-2 px-6 rounded-full flex items-center">
|
473 |
<i class="fas fa-play mr-2"></i> Regarder
|
474 |
</button>
|
475 |
+
<button id="playMovieAutoBtn" class="bg-green-600 hover:bg-green-700 text-white font-medium py-2 px-6 rounded-full flex items-center">
|
476 |
+
<i class="fas fa-bolt mr-2"></i> Mode Automatique
|
477 |
</button>
|
478 |
</div>
|
479 |
</div>
|
|
|
494 |
<iframe id="movieFrame" frameborder="0" allowfullscreen allow="autoplay; fullscreen"></iframe>
|
495 |
</div>
|
496 |
</div>
|
497 |
+
|
498 |
+
<!-- Auto-play controls -->
|
499 |
+
<div class="autoplay-controls" id="autoplayControls">
|
500 |
+
<button id="stopAutoplayBtn" class="autoplay-btn">
|
501 |
+
<i class="fas fa-stop mr-1"></i> Arrêter
|
502 |
+
</button>
|
503 |
+
<select id="playbackSpeed" class="autoplay-speed">
|
504 |
+
<option value="1">1x Vitesse</option>
|
505 |
+
<option value="1.25">1.25x Vitesse</option>
|
506 |
+
<option value="1.5">1.5x Vitesse</option>
|
507 |
+
<option value="2">2x Vitesse</option>
|
508 |
+
</select>
|
509 |
+
</div>
|
510 |
+
</div>
|
511 |
+
|
512 |
+
<!-- Auto-play notification -->
|
513 |
+
<div class="autoplay-notification" id="autoplayNotification">
|
514 |
+
<span id="countdownText">Lecture automatique dans <span id="countdown">5</span> secondes...</span>
|
515 |
+
<button id="cancelAutoplay" class="ml-4 text-sm text-purple-300 hover:text-purple-100">Annuler</button>
|
516 |
</div>
|
517 |
|
518 |
<!-- Loading Overlay -->
|
|
|
584 |
</footer>
|
585 |
|
586 |
<script>
|
587 |
+
// Configuration de la base de données de films
|
588 |
+
const movieDatabase = [];
|
589 |
+
const totalMovies = 20500;
|
590 |
+
|
591 |
+
// Variables pour le mode automatique
|
592 |
+
let autoplayInterval;
|
593 |
+
let currentAutoplayMovieIndex = 0;
|
594 |
+
let isAutoplayActive = false;
|
595 |
+
let playbackSpeed = 1;
|
596 |
+
|
597 |
+
// Générateur de films avec des données réalistes
|
598 |
+
const generateMovieDatabase = () => {
|
599 |
+
const genres = [
|
600 |
+
{id: 28, name: "Action"},
|
601 |
+
{id: 12, name: "Aventure"},
|
602 |
+
{id: 16, name: "Animation"},
|
603 |
+
{id: 35, name: "Comédie"},
|
604 |
+
{id: 80, name: "Crime"},
|
605 |
+
{id: 18, name: "Drame"},
|
606 |
+
{id: 10751, name: "Familial"},
|
607 |
+
{id: 14, name: "Fantastique"},
|
608 |
+
{id: 36, name: "Histoire"},
|
609 |
+
{id: 27, name: "Horreur"},
|
610 |
+
{id: 10402, name: "Musique"},
|
611 |
+
{id: 9648, name: "Mystère"},
|
612 |
+
{id: 10749, name: "Romance"},
|
613 |
+
{id: 878, name: "Science-Fiction"},
|
614 |
+
{id: 53, name: "Thriller"}
|
615 |
+
];
|
616 |
+
|
617 |
+
const directors = [
|
618 |
+
"Christopher Nolan", "Steven Spielberg", "Martin Scorsese",
|
619 |
+
"Quentin Tarantino", "David Fincher", "James Cameron",
|
620 |
+
"Peter Jackson", "Ridley Scott", "Alfred Hitchcock",
|
621 |
+
"Stanley Kubrick", "Francis Ford Coppola", "Tim Burton"
|
622 |
+
];
|
623 |
+
|
624 |
+
const actors = [
|
625 |
+
"Leonardo DiCaprio", "Tom Hanks", "Brad Pitt", "Robert Downey Jr.",
|
626 |
+
"Johnny Depp", "Will Smith", "Denzel Washington", "Tom Cruise",
|
627 |
+
"Matt Damon", "Christian Bale", "Morgan Freeman", "Samuel L. Jackson",
|
628 |
+
"Harrison Ford", "Al Pacino", "Robert De Niro", "Meryl Streep",
|
629 |
+
"Scarlett Johansson", "Jennifer Lawrence", "Emma Stone", "Natalie Portman"
|
630 |
+
];
|
631 |
+
|
632 |
+
const titles = [
|
633 |
+
"Inception", "The Dark Knight", "Interstellar", "Pulp Fiction",
|
634 |
+
"Fight Club", "The Shawshank Redemption", "The Godfather",
|
635 |
+
"Forrest Gump", "The Matrix", "Goodfellas", "The Silence of the Lambs",
|
636 |
+
"Saving Private Ryan", "Gladiator", "Titanic", "Avatar", "Jurassic Park",
|
637 |
+
"Star Wars", "The Lord of the Rings", "Harry Potter", "The Avengers"
|
638 |
+
];
|
639 |
+
|
640 |
+
const suffixes = [
|
641 |
+
"Le Retour", "La Revanche", "L'Héritage", "La Fin",
|
642 |
+
"Le Commencement", "La Dernière Chance", "La Bataille Finale",
|
643 |
+
"Les Origines", "La Menace", "L'Alliance", "La Prophétie"
|
644 |
+
];
|
645 |
+
|
646 |
+
for (let i = 0; i < totalMovies; i++) {
|
647 |
+
const titleIndex = i % titles.length;
|
648 |
+
const suffixIndex = i % suffixes.length;
|
649 |
+
const genreCount = Math.floor(Math.random() * 3) + 1;
|
650 |
+
const movieGenres = [];
|
651 |
|
652 |
+
for (let j = 0; j < genreCount; j++) {
|
653 |
+
const randomGenre = genres[Math.floor(Math.random() * genres.length)];
|
654 |
+
if (!movieGenres.some(g => g.id === randomGenre.id)) {
|
655 |
+
movieGenres.push(randomGenre);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
656 |
}
|
|
|
|
|
657 |
}
|
658 |
|
659 |
+
// Créer un titre unique pour les films après les premiers
|
660 |
+
let movieTitle = titles[titleIndex];
|
661 |
+
if (i >= titles.length) {
|
662 |
+
movieTitle = `${titles[titleIndex]} : ${suffixes[suffixIndex]}`;
|
663 |
+
}
|
664 |
|
665 |
+
// Générer une date de sortie aléatoire entre 1950 et 2024
|
666 |
+
const year = Math.floor(Math.random() * (2024 - 1950 + 1)) + 1950;
|
667 |
+
const month = Math.floor(Math.random() * 12) + 1;
|
668 |
+
const day = Math.floor(Math.random() * 28) + 1;
|
669 |
+
const releaseDate = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;
|
|
|
|
|
670 |
|
671 |
+
// Générer une durée aléatoire entre 1h30 et 3h
|
672 |
+
const hours = Math.floor(Math.random() * 2) + 1;
|
673 |
+
const minutes = Math.floor(Math.random() * 60);
|
674 |
+
const duration = `${hours}h ${minutes}min`;
|
675 |
+
|
676 |
+
// Sélectionner aléatoirement un réalisateur et des acteurs
|
677 |
+
const director = directors[Math.floor(Math.random() * directors.length)];
|
678 |
+
const cast = [];
|
679 |
+
const actorCount = Math.floor(Math.random() * 4) + 2;
|
680 |
+
|
681 |
+
for (let k = 0; k < actorCount; k++) {
|
682 |
+
const randomActor = actors[Math.floor(Math.random() * actors.length)];
|
683 |
+
if (!cast.includes(randomActor)) {
|
684 |
+
cast.push(randomActor);
|
685 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
686 |
}
|
687 |
|
688 |
+
// Générer une note aléatoire entre 2.5 et 9.5
|
689 |
+
const rating = (Math.random() * 7 + 2.5).toFixed(1);
|
690 |
+
|
691 |
+
// Créer l'objet film
|
692 |
+
const movie = {
|
693 |
+
id: i + 1,
|
694 |
+
title: movieTitle,
|
695 |
+
original_title: movieTitle,
|
696 |
+
overview: `Un film captivant avec une histoire intrigante et des personnages mémorables. Réalisé par ${director} avec ${cast.join(", ")}.`,
|
697 |
+
poster_path: `/posters/${(i % 20) + 1}.jpg`, // 20 posters différents en rotation
|
698 |
+
backdrop_path: `/backdrops/${(i % 10) + 1}.jpg`, // 10 fonds différents en rotation
|
699 |
+
release_date: releaseDate,
|
700 |
+
vote_average: parseFloat(rating),
|
701 |
+
vote_count: Math.floor(Math.random() * 10000),
|
702 |
+
genre_ids: movieGenres.map(g => g.id),
|
703 |
+
genres: movieGenres,
|
704 |
+
popularity: Math.floor(Math.random() * 100),
|
705 |
+
video: true,
|
706 |
+
adult: Math.random() > 0.8, // 20% de chance d'être pour adultes
|
707 |
+
duration: duration,
|
708 |
+
director: director,
|
709 |
+
cast: cast.join(", "),
|
710 |
+
language: 'Français',
|
711 |
+
isFeatured: i < 20,
|
712 |
+
isTrending: i >= 20 && i < 40,
|
713 |
+
isPopular: i >= 40 && i < 60,
|
714 |
+
video_urls: {
|
715 |
+
'1080': `https://example.com/videos/${i+1}/1080p.mp4`,
|
716 |
+
'720': `https://example.com/videos/${i+1}/720p.mp4`,
|
717 |
+
'480': `https://example.com/videos/${i+1}/480p.mp4`
|
718 |
+
}
|
719 |
+
};
|
720 |
+
|
721 |
+
movieDatabase.push(movie);
|
722 |
}
|
723 |
+
|
724 |
+
return movieDatabase;
|
725 |
};
|
726 |
|
727 |
+
// Initialisation de la base de données
|
728 |
+
generateMovieDatabase();
|
|
|
|
|
|
|
|
|
729 |
|
730 |
+
// Générer les cartes de films
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
731 |
const generateMovieCard = (movie) => {
|
732 |
+
// Utiliser des images de placeholder pour la démo
|
733 |
+
const posterUrl = `https://via.placeholder.com/500x750?text=${encodeURIComponent(movie.title)}`;
|
734 |
+
const backdropUrl = `https://via.placeholder.com/1280x720?text=${encodeURIComponent(movie.title)}`;
|
735 |
|
736 |
return `
|
737 |
+
<div class="movie-card relative rounded-lg overflow-hidden transition duration-300" data-movie-id="${movie.id}">
|
738 |
<img src="${posterUrl}" alt="${movie.title}" class="w-full h-auto object-cover">
|
739 |
<div class="absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 hover:opacity-100 transition duration-300 flex flex-col justify-end p-4">
|
740 |
<h3 class="text-white font-bold">${movie.title}</h3>
|
741 |
<div class="flex items-center text-sm text-gray-300 mt-1">
|
742 |
+
<span>${movie.release_date.substring(0, 4)}</span>
|
743 |
<span class="mx-2">•</span>
|
744 |
<span>${movie.duration}</span>
|
745 |
</div>
|
746 |
<div class="flex mt-2">
|
747 |
+
${movie.genres.slice(0, 2).map(genre =>
|
748 |
+
`<span class="text-xs bg-gray-800/80 text-white px-2 py-1 rounded mr-1">${genre.name}</span>`
|
749 |
+
).join('')}
|
750 |
</div>
|
751 |
<div class="flex items-center mt-2">
|
752 |
<div class="rating-stars text-sm mr-2">
|
753 |
+
${'★'.repeat(Math.floor(movie.vote_average / 2))}
|
754 |
</div>
|
755 |
+
<span class="text-xs text-gray-300">${movie.vote_average}/10</span>
|
756 |
</div>
|
757 |
<div class="absolute inset-0 flex items-center justify-center">
|
758 |
<button class="play-icon opacity-0 absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-purple-600 hover:bg-purple-700 text-white rounded-full w-12 h-12 flex items-center justify-center transition duration-300"
|
|
|
765 |
`;
|
766 |
};
|
767 |
|
768 |
+
// Afficher les détails d'un film dans la modal
|
769 |
+
const showMovieDetails = (movie) => {
|
770 |
+
// Utiliser des images de placeholder pour la démo
|
771 |
+
const posterUrl = `https://via.placeholder.com/500x750?text=${encodeURIComponent(movie.title)}`;
|
|
|
772 |
|
|
|
773 |
document.getElementById('modalPoster').src = posterUrl;
|
774 |
document.getElementById('modalPoster').alt = movie.title;
|
775 |
document.getElementById('modalTitle').textContent = movie.title;
|
776 |
+
document.getElementById('modalRating').textContent = movie.vote_average;
|
777 |
+
document.getElementById('modalYear').textContent = movie.release_date.substring(0, 4);
|
778 |
document.getElementById('modalDuration').textContent = movie.duration;
|
779 |
+
document.getElementById('modalOverview').textContent = movie.overview;
|
780 |
+
document.getElementById('modalDirector').textContent = movie.director;
|
781 |
+
document.getElementById('modalCast').textContent = movie.cast;
|
782 |
|
783 |
+
// Mettre à jour les genres
|
784 |
const genresContainer = document.getElementById('modalGenres');
|
785 |
genresContainer.innerHTML = '';
|
786 |
|
787 |
+
movie.genres.forEach(genre => {
|
788 |
+
const genreElement = document.createElement('span');
|
789 |
+
genreElement.className = 'text-xs bg-gray-800 text-white px-3 py-1 rounded-full';
|
790 |
+
genreElement.textContent = genre.name;
|
791 |
+
genresContainer.appendChild(genreElement);
|
792 |
+
});
|
|
|
|
|
793 |
|
794 |
+
// Mettre à jour les boutons
|
795 |
document.getElementById('playMovieBtn').setAttribute('data-movie-id', movie.id);
|
796 |
+
document.getElementById('playMovieAutoBtn').setAttribute('data-movie-id', movie.id);
|
797 |
+
|
798 |
+
// Afficher la modal
|
799 |
+
document.getElementById('movieModal').classList.add('active');
|
800 |
+
document.body.style.overflow = 'hidden';
|
801 |
};
|
802 |
|
803 |
+
// Jouer un film
|
804 |
+
const playMovie = (movieId, autoPlay = false) => {
|
805 |
const movie = movieDatabase.find(m => m.id === movieId);
|
806 |
if (!movie) return;
|
807 |
|
|
|
809 |
const movieFrame = document.getElementById('movieFrame');
|
810 |
const loadingOverlay = document.getElementById('loadingOverlay');
|
811 |
|
812 |
+
// Afficher le chargement
|
813 |
loadingOverlay.classList.remove('hidden');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
814 |
videoPlayer.classList.remove('hidden');
|
815 |
document.body.style.overflow = 'hidden';
|
816 |
|
817 |
+
// Pour la démo, nous utilisons une vidéo YouTube en placeholder
|
818 |
+
// Dans une vraie application, vous utiliseriez movie.video_urls['1080'] ou autre qualité
|
819 |
+
const trailerIds = [
|
820 |
+
'kOHB85vDuow', // Inception
|
821 |
+
'EXeTwQWrcwY', // The Dark Knight
|
822 |
+
'zSWdZVtXT7E', // Interstellar
|
823 |
+
's7EdQ4FqbhY', // Pulp Fiction
|
824 |
+
'qtRKdVHc-cE' // Fight Club
|
825 |
+
];
|
826 |
+
const trailerId = trailerIds[movieId % trailerIds.length];
|
827 |
+
|
828 |
+
// Simuler un temps de chargement
|
829 |
+
setTimeout(() => {
|
830 |
+
movieFrame.src = `https://www.youtube.com/embed/${trailerId}?autoplay=1&mute=1&enablejsapi=1`;
|
831 |
+
|
832 |
+
// Masquer le chargement après un délai
|
833 |
setTimeout(() => {
|
834 |
loadingOverlay.classList.add('hidden');
|
835 |
}, 1000);
|
836 |
+
|
837 |
+
// Si autoPlay est activé, afficher la notification
|
838 |
+
if (autoPlay) {
|
839 |
+
showAutoplayNotification(movieId);
|
840 |
+
}
|
841 |
+
}, 800);
|
842 |
+
};
|
843 |
+
|
844 |
+
// Afficher la notification de lecture automatique
|
845 |
+
const showAutoplayNotification = (nextMovieId) => {
|
846 |
+
const notification = document.getElementById('autoplayNotification');
|
847 |
+
const countdownElement = document.getElementById('countdown');
|
848 |
+
let seconds = 5;
|
849 |
+
|
850 |
+
notification.style.display = 'flex';
|
851 |
+
countdownElement.textContent = seconds;
|
852 |
+
|
853 |
+
const countdown = setInterval(() => {
|
854 |
+
seconds--;
|
855 |
+
countdownElement.textContent = seconds;
|
856 |
+
|
857 |
+
if (seconds <= 0) {
|
858 |
+
clearInterval(countdown);
|
859 |
+
notification.style.display = 'none';
|
860 |
+
playMovie(nextMovieId, true); // Continuer le mode automatique
|
861 |
+
}
|
862 |
+
}, 1000);
|
863 |
+
|
864 |
+
// Permettre à l'utilisateur d'annuler la lecture automatique
|
865 |
+
document.getElementById('cancelAutoplay').onclick = () => {
|
866 |
+
clearInterval(countdown);
|
867 |
+
notification.style.display = 'none';
|
868 |
+
stopAutoplay();
|
869 |
};
|
870 |
+
};
|
871 |
+
|
872 |
+
// Démarrer le mode automatique
|
873 |
+
const startAutoplay = (startingMovieId = null) => {
|
874 |
+
isAutoplayActive = true;
|
875 |
|
876 |
+
// Trouver l'index du film de départ
|
877 |
+
if (startingMovieId) {
|
878 |
+
currentAutoplayMovieIndex = movieDatabase.findIndex(m => m.id === startingMovieId);
|
879 |
+
if (currentAutoplayMovieIndex === -1) currentAutoplayMovieIndex = 0;
|
880 |
+
} else {
|
881 |
+
currentAutoplayMovieIndex = 0;
|
882 |
+
}
|
883 |
+
|
884 |
+
// Afficher les contrôles de lecture automatique
|
885 |
+
document.getElementById('autoplayControls').style.display = 'flex';
|
886 |
+
|
887 |
+
// Jouer le premier film
|
888 |
+
playMovie(movieDatabase[currentAutoplayMovieIndex].id, true);
|
889 |
};
|
890 |
|
891 |
+
// Arrêter le mode automatique
|
892 |
+
const stopAutoplay = () => {
|
893 |
+
isAutoplayActive = false;
|
894 |
+
document.getElementById('autoplayControls').style.display = 'none';
|
895 |
|
896 |
+
if (autoplayInterval) {
|
897 |
+
clearInterval(autoplayInterval);
|
898 |
+
autoplayInterval = null;
|
899 |
+
}
|
900 |
+
};
|
901 |
+
|
902 |
+
// Initialisation de la page
|
903 |
+
document.addEventListener('DOMContentLoaded', function() {
|
904 |
+
// Charger les sections de films
|
905 |
const newReleases = movieDatabase.filter(m => m.isFeatured);
|
906 |
const trending = movieDatabase.filter(m => m.isTrending);
|
907 |
const popularMovies = movieDatabase.filter(m => m.isPopular);
|
908 |
|
909 |
+
// Fonction pour charger des films dans une grille
|
910 |
const loadMoviesIntoGrid = (gridElement, movies, itemsPerPage = 20) => {
|
|
|
911 |
gridElement.innerHTML = '';
|
912 |
|
|
|
913 |
movies.slice(0, itemsPerPage).forEach(movie => {
|
914 |
const card = document.createElement('div');
|
915 |
card.innerHTML = generateMovieCard(movie);
|
916 |
gridElement.appendChild(card);
|
917 |
|
918 |
+
// Ajouter les événements de clic
|
919 |
card.addEventListener('click', function() {
|
920 |
+
showMovieDetails(movie);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
921 |
});
|
922 |
+
|
923 |
+
// Bouton de lecture
|
924 |
+
const playButton = card.querySelector('.play-icon');
|
925 |
+
if (playButton) {
|
926 |
+
playButton.addEventListener('click', function(e) {
|
927 |
+
e.stopPropagation();
|
928 |
+
playMovie(movie.id);
|
929 |
+
});
|
930 |
+
}
|
931 |
});
|
932 |
};
|
933 |
|
934 |
+
// Charger les sections initiales
|
935 |
loadMoviesIntoGrid(document.getElementById('newReleasesGrid'), newReleases);
|
936 |
loadMoviesIntoGrid(document.getElementById('trendingGrid'), trending);
|
937 |
loadMoviesIntoGrid(document.getElementById('popularMoviesGrid'), popularMovies);
|
938 |
|
939 |
+
// Charger le catalogue complet
|
940 |
+
loadMoviesIntoGrid(document.getElementById('fullCatalogGrid'), movieDatabase.slice(0, 40));
|
941 |
|
942 |
+
// Bouton "Commencer à regarder" (joue le premier film)
|
943 |
document.getElementById('playFeaturedMovie').addEventListener('click', function() {
|
944 |
playMovie(movieDatabase[0].id);
|
945 |
});
|
946 |
|
947 |
+
// Bouton "Mode Automatique" (démarre la lecture automatique)
|
948 |
+
document.getElementById('startAutoplay').addEventListener('click', function() {
|
949 |
+
startAutoplay();
|
950 |
+
});
|
951 |
+
|
952 |
+
// Charger plus de films
|
953 |
let currentPage = 1;
|
954 |
const itemsPerPage = 40;
|
955 |
document.getElementById('loadMoreButton').addEventListener('click', function() {
|
|
|
957 |
const startIndex = (currentPage - 1) * itemsPerPage;
|
958 |
const endIndex = startIndex + itemsPerPage;
|
959 |
|
960 |
+
// Afficher le chargement
|
961 |
const button = this;
|
962 |
button.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Chargement...';
|
963 |
button.disabled = true;
|
964 |
|
965 |
+
// Simuler un temps de chargement
|
966 |
setTimeout(() => {
|
967 |
+
// Ajouter les nouveaux films
|
968 |
movieDatabase.slice(startIndex, endIndex).forEach(movie => {
|
969 |
const card = document.createElement('div');
|
970 |
card.innerHTML = generateMovieCard(movie);
|
971 |
document.getElementById('fullCatalogGrid').appendChild(card);
|
972 |
|
973 |
+
// Ajouter les événements de clic
|
974 |
card.addEventListener('click', function() {
|
975 |
+
showMovieDetails(movie);
|
|
|
|
|
976 |
});
|
977 |
});
|
978 |
|
979 |
+
// Réactiver le bouton
|
980 |
button.textContent = 'Charger plus de films';
|
981 |
button.disabled = false;
|
982 |
|
983 |
+
// Masquer le bouton si tous les films sont chargés
|
984 |
if (endIndex >= movieDatabase.length) {
|
985 |
button.style.display = 'none';
|
986 |
}
|
987 |
}, 800);
|
988 |
});
|
989 |
|
990 |
+
// Recherche
|
991 |
document.getElementById('searchButton').addEventListener('click', function() {
|
992 |
const searchTerm = document.getElementById('searchInput').value.toLowerCase();
|
993 |
if (searchTerm.trim() === '') return;
|
994 |
|
995 |
const results = movieDatabase.filter(movie =>
|
996 |
movie.title.toLowerCase().includes(searchTerm) ||
|
997 |
+
movie.original_title.toLowerCase().includes(searchTerm)
|
998 |
+
).slice(0, 100); // Limiter à 100 résultats
|
999 |
|
1000 |
+
// Afficher les résultats
|
1001 |
loadMoviesIntoGrid(document.getElementById('fullCatalogGrid'), results);
|
1002 |
});
|
1003 |
|
1004 |
+
// Recherche avec la touche Entrée
|
1005 |
+
document.getElementById('searchInput').addEventListener('keypress', function(e) {
|
1006 |
+
if (e.key === 'Enter') {
|
1007 |
+
document.getElementById('searchButton').click();
|
1008 |
+
}
|
1009 |
+
});
|
1010 |
+
|
1011 |
+
// Fermer la modal
|
1012 |
document.getElementById('closeModal').addEventListener('click', function() {
|
1013 |
document.getElementById('movieModal').classList.remove('active');
|
1014 |
document.body.style.overflow = '';
|
1015 |
});
|
1016 |
|
1017 |
+
// Jouer le film depuis la modal
|
1018 |
document.getElementById('playMovieBtn').addEventListener('click', function() {
|
1019 |
const movieId = parseInt(this.getAttribute('data-movie-id'));
|
1020 |
document.getElementById('movieModal').classList.remove('active');
|
1021 |
playMovie(movieId);
|
1022 |
});
|
1023 |
|
1024 |
+
// Jouer en mode automatique depuis la modal
|
1025 |
+
document.getElementById('playMovieAutoBtn').addEventListener('click', function() {
|
1026 |
+
const movieId = parseInt(this.getAttribute('data-movie-id'));
|
1027 |
+
document.getElementById('movieModal').classList.remove('active');
|
1028 |
+
startAutoplay(movieId);
|
1029 |
+
});
|
1030 |
+
|
1031 |
+
// Fermer le lecteur vidéo
|
1032 |
+
document.getElementById('closePlayer').addEventListener('click', function() {
|
1033 |
+
document.getElementById('videoPlayer').classList.add('hidden');
|
1034 |
+
document.getElementById('movieFrame').src = '';
|
1035 |
+
document.body.style.overflow = '';
|
1036 |
+
stopAutoplay();
|
1037 |
+
});
|
1038 |
+
|
1039 |
+
// Bouton de retour en haut
|
1040 |
document.getElementById('scrollToTop').addEventListener('click', function() {
|
1041 |
window.scrollTo({
|
1042 |
top: 0,
|
|
|
1044 |
});
|
1045 |
});
|
1046 |
|
1047 |
+
// Afficher/masquer le bouton de retour en haut
|
1048 |
window.addEventListener('scroll', function() {
|
1049 |
const scrollToTopBtn = document.getElementById('scrollToTop');
|
1050 |
if (window.pageYOffset > 300) {
|
|
|
1054 |
}
|
1055 |
});
|
1056 |
|
1057 |
+
// Arrêter la lecture automatique
|
1058 |
+
document.getElementById('stopAutoplayBtn').addEventListener('click', function() {
|
1059 |
+
stopAutoplay();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1060 |
});
|
1061 |
+
|
1062 |
+
// Changer la vitesse de lecture
|
1063 |
+
document.getElementById('playbackSpeed').addEventListener('change', function() {
|
1064 |
+
playbackSpeed = parseFloat(this.value);
|
1065 |
+
// Dans une vraie application, vous appliqueriez cette vitesse à la vidéo
|
1066 |
+
alert(`Vitesse de lecture changée à ${this.value}x (fonctionnalité de démonstration)`);
|
1067 |
+
});
|
1068 |
+
|
1069 |
+
// Simuler la fin de la vidéo et passer au film suivant
|
1070 |
+
window.onmessage = function(e) {
|
1071 |
+
if (e.data === 'videoEnded' && isAutoplayActive) {
|
1072 |
+
currentAutoplayMovieIndex = (currentAutoplayMovieIndex + 1) % movieDatabase.length;
|
1073 |
+
const nextMovieId = movieDatabase[currentAutoplayMovieIndex].id;
|
1074 |
+
showAutoplayNotification(nextMovieId);
|
1075 |
+
}
|
1076 |
+
};
|
1077 |
+
});
|
1078 |
</script>
|
1079 |
<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/streamvista" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
1080 |
</html>
|
prompts.txt
CHANGED
@@ -2,4 +2,6 @@ Films et séries illimités en streaming Regardez vos films et séries préfér
|
|
2 |
démarer la lecture des film en automatique directement
|
3 |
veuiller coriger l 'erreur du lecture ..Une erreur s'est produite. Veuillez réessayer ultérieurement. (ID de lecture : Osm8DkT81xucF34w) En savoir plus
|
4 |
ajouter une grosse base de données de 52200 nouveautéé a regarder en entier fillm complet
|
5 |
-
je veux une base de données de 20500 film complet a regarder en entier avec les images des affiches des film avec une tres belle interface ,, afficher les vrai affiches des film
|
|
|
|
|
|
2 |
démarer la lecture des film en automatique directement
|
3 |
veuiller coriger l 'erreur du lecture ..Une erreur s'est produite. Veuillez réessayer ultérieurement. (ID de lecture : Osm8DkT81xucF34w) En savoir plus
|
4 |
ajouter une grosse base de données de 52200 nouveautéé a regarder en entier fillm complet
|
5 |
+
je veux une base de données de 20500 film complet a regarder en entier avec les images des affiches des film avec une tres belle interface ,, afficher les vrai affiches des film
|
6 |
+
reconfigue toutes les film pour quil joue corectement et fonctionne en automatique
|
7 |
+
activer le mode lecture en mode rapide et automatique
|