Skip to content

Commit 2b42795

Browse files
danielfurtclaude
andcommitted
fix: force video autoplay on mobile and disable page scroll
- Force .play() via JS on loading and background videos for mobile - Add overflow:hidden on html/body to prevent page scrolling - Restore internal step scroll for card content Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e0c3052 commit 2b42795

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

sections/ActivationForm.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ export default function ActivationForm({
191191
</div>
192192

193193
<style dangerouslySetInnerHTML={{ __html: `
194+
html, body { overflow: hidden !important; height: 100vh !important; }
194195
@keyframes loadingFadeOut {
195196
0% { opacity: 1; }
196197
100% { opacity: 0; visibility: hidden; }
@@ -493,16 +494,27 @@ export default function ActivationForm({
493494
bgVideo.style.opacity = '1';
494495
}
495496
}
497+
// Force autoplay on mobile
496498
var video = document.getElementById('loading-video');
497499
if (video) {
500+
video.setAttribute('playsinline', '');
501+
video.setAttribute('muted', '');
502+
video.muted = true;
503+
video.play().catch(function() {});
498504
video.addEventListener('ended', dismissLoading);
499-
// Fallback if video fails to load
500505
video.addEventListener('error', dismissLoading);
501-
// Safety fallback after 5s
502506
setTimeout(dismissLoading, 5000);
503507
} else {
504508
dismissLoading();
505509
}
510+
// Force autoplay on background video
511+
var bgVid = document.querySelector('#bg-video-container video');
512+
if (bgVid) {
513+
bgVid.setAttribute('playsinline', '');
514+
bgVid.setAttribute('muted', '');
515+
bgVid.muted = true;
516+
bgVid.play().catch(function() {});
517+
}
506518
})();
507519
`
508520
}} />

0 commit comments

Comments
 (0)