function getEmbed() {
const animeId = document.getElementById("animeId").value;
const season = document.getElementById("season").value;
const episode = document.getElementById("episode").value;
if (!animeId || !season || !episode) {
alert("Please enter all fields (Anime ID, Season, Episode).");
return;
}
// Generate the embed URL dynamically based on the inputs
const embedUrl = `/anime/embed/${animeId}/${season}/${episode}`;
// Here, you would dynamically fetch the subtitle URL or other details for the video
// For now, we're using a placeholder URL
const subtitlesUrl = `/subtitles/${animeId}/${season}/${episode}.vtt`; // Replace with actual URL for subtitles
// Set the embed container with the video player
const embedContainer = document.getElementById("embedContainer");
embedContainer.innerHTML = `
thumbnails="https://path-to-thumbnails.vtt"
aspect-ratio="16/9"
crossorigin
>
`;
}