Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
<body>

<div id="vi">
<video id="vv" autoplay muted playsinline src="/intro.mp4"></video>
<video id="vv" autoplay playsinline src="/intro.mp4"></video>
<button id="vi-play" style="display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.3);color:#fff;font-size:1.1rem;font-weight:700;padding:14px 32px;border-radius:40px;cursor:pointer;font-family:Inter,sans-serif;letter-spacing:.05em">▶ Play Intro</button>
<button id="vi-skip">Skip ›</button>
</div>

Expand Down Expand Up @@ -919,13 +920,20 @@ <h1 className="text-xl font-bold">{navItem?.label}</h1>
window.addEventListener("DOMContentLoaded",function(){
var vv=document.getElementById("vv");
var skip=document.getElementById("vi-skip");
var playBtn=document.getElementById("vi-play");
if(vv){
vv.addEventListener("ended",startApp);
vv.addEventListener("error",startApp);
// if video can't autoplay (blocked), fall back after 200ms
var playPromise=vv.play();
if(playPromise&&typeof playPromise.catch==="function"){
playPromise.catch(function(){startApp();});
playPromise.catch(function(){
// autoplay blocked — show click-to-play button
if(playBtn) playBtn.style.display="block";
if(playBtn) playBtn.addEventListener("click",function(){
playBtn.style.display="none";
vv.play();
});
});
Comment on lines +929 to +936
}
} else {
startApp();
Expand Down
Binary file modified frontend/intro.mp4
Binary file not shown.