Beneath the hero carousel,Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Vipul-Gejage/Disney-Hotstar-Clone/llms.txt
Use this file to discover all available pages before exploring further.
Hotstar.html renders a row of five franchise preview cards inside .video-card-container. Each card represents one of the major Disney+ content brands — Disney, Pixar, Marvel, Star Wars, and National Geographic. At rest the card shows a branded logo image; when the user hovers over the card, the logo disappears and a muted, looping preview video starts playing in its place. Moving the cursor away pauses the video and the logo reappears via CSS.
File Mapping
| Franchise | Image file | Video file |
|---|---|---|
| Disney | images/disney.PNG | videos/disney.mp4 |
| Pixar | images/pixar.PNG | videos/pixar.mp4 |
| Marvel | images/marvel.PNG | videos/marvel.mp4 |
| Star Wars | images/star-wars.PNG | videos/star-war.mp4 |
| Nat Geo | images/geographic.PNG | videos/geographic.mp4 |
HTML Structure for One Card
.video-card contains exactly two children:
.video-card-image— a static<img>that is visible by default.card-video— an HTML5<video>element markedmutedandloop, positioned absolutely so it sits behind the image until hover triggers the CSS swap
How It Works
CSS — Show / Hide Swap on Hover
At rest, both.video-card-image and .card-video fill the card dimensions via width: 100%; height: 100%; object-fit: cover. The .card-video is position: absolute so it underlays the image. On hover, the image is hidden with display: none and the video is switched to position: relative so it takes up the card’s layout space:
JavaScript — Play and Pause via Mouse Events
ADOMContentLoaded listener in Hotstar.js selects all .video-card elements and attaches mouseenter and mouseleave handlers to each. mouseenter calls video.play() on the card’s <video> child; mouseleave calls video.pause(). The video.currentTime reset (which would rewind to the start on mouse-out) is present in the source but commented out.
Adding a New Franchise Card
To add a sixth franchise card, insert a new.video-card div inside .video-card-container in Hotstar.html and provide matching image and video assets:
querySelectorAll('.video-card') call automatically picks up any new cards at page load.