Your Legal Movie Streaming Site

}); /* General styling */ body { margin: 0; font-family: Arial, sans-serif; background-color: #f4f4f4; } /* Header styling */ header { background-color: #333; color: #fff; padding: 1rem; text-align: center; } /* Layout container */ .container { display: flex; min-height: 80vh; } /* Sidebar styling */ .sidebar { width: 250px; background: #555; color: #fff; padding: 1rem; } .sidebar h2 { text-align: center; } .sidebar ul { list-style: none; padding: 0; } .sidebar li { margin: 0.5rem 0; padding: 0.5rem; cursor: pointer; transition: background-color 0.3s; } .sidebar li:hover { background-color: #666; } /* Main video container styling */ .video-container { flex-grow: 1; padding: 1rem; } .video-container video { width: 100%; max-height: 70vh; background-color: #000; } /* Movie description styling */ .movie-description { margin-top: 1rem; font-size: 1.1rem; }// Define an array of movies const movies = [ { title: "Movie One", src: "movie1.mp4", description: "Description for Movie One. (Ensure you have the legal rights to stream this movie.)" }, { title: "Movie Two", src: "movie2.mp4", description: "Description for Movie Two. Please note: All content should be legally acquired." }, { title: "Movie Three", src: "movie3.mp4", description: "Description for Movie Three. Enjoy the show – responsibly and legally!" } ]; // Populate the movie list in the sidebar const movieList = document.getElementById('movieList'); movies.forEach((movie, index) => { const li = document.createElement('li'); li.textContent = movie.title; li.addEventListener('click', function() { loadMovie(index); }); movieList.appendChild(li); }); // Function to load the selected movie into the video player function loadMovie(index) { const movie = movies[index]; const videoPlayer = document.getElementById('videoPlayer'); const movieDescription = document.getElementById('movieDescription'); // Update the video source and description videoPlayer.src = movie.src; videoPlayer.load(); movieDescription.textContent = movie.description; } // Load the first movie by default when the page loads document.addEventListener('DOMContentLoaded', function() { loadMovie(0); });