                    }
                    });
                });

                // Observe the container, not the video
                observer.observe(container);
            } else {
                // Fallback for browsers without IntersectionObserver
                video.src = video.dataset.src;
                const sourceElement = document.createElement("source");
                sourceElement.src = video.dataset.src;
                sourceElement.type = video.dataset.type;
                video.