Skip to content

rion14146-collab/a-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

<style> body { margin: 0; background: #000; overflow: hidden; font-family: sans-serif; } main { height: 100vh; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; } main::-webkit-scrollbar { display: none; } section { height: 100vh; width: 100vw; scroll-snap-align: start; display: flex; justify-content: center; alignItems: center; position: relative; } video { width: 100%; height: 100%; object-fit: contain; } </style>
<script>
    const videos = document.querySelectorAll('video');
    
    // التشغيل عند الظهور (تيك توك)
    const observer = new IntersectionObserver((entries) => {
        entries.forEach(entry => {
            if (entry.isIntersecting) entry.target.play();
            else { entry.target.pause(); entry.target.currentTime = 0; }
        });
    }, { threshold: 0.6 });

    videos.forEach(v => {
        observer.observe(v);
        // تسريع 2x عند الضغط المطول
        v.onpointerdown = () => v.playbackRate = 2;
        v.onpointerup = () => v.playbackRate = 1;
    });
</script>

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages