Hey @ryan.whitaker321!
Both of your approaches are valid, but they solve slightly different problems — here’s how to think about them.
preload="none" + poster tells the browser to skip fetching video data until the user interacts or you call .play(). It’s a solid baseline, especially on mobile where browsers are already conservative. IntersectionObserver with a data-src swap is stricter — with preload="none" alone, browsers may still establish connections or fetch metadata as items enter the viewport. Keeping the URL in data-src and only moving it to src on viewport entry guarantees zero network activity until that moment.
For a paginated list with lots of short clips, combining both gives you the tightest control.
On your second question — you’re right to flag this. An IntersectionObserver does NOT automatically pick up newly appended items from CMS Load. It only watches elements you explicitly pass to observer.observe(). New <video> elements added by “load more” won’t be tracked.
The cleanest fix is hooking into the Attributes v2 JavaScript callback API:
window.FinsweetAttributes ||= [];
window.FinsweetAttributes.push(['list', async (listInstances) => {
const [listInstance] = listInstances;
const videoObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
const video = entry.target;
const src = video.dataset.src;
if (src && !video.src) {
video.src = src;
video.load();
}
videoObserver.unobserve(video);
}
});
}, { rootMargin: '200px' });
function observeVideosInItems(items) {
items.forEach(item => {
const video = item.element.querySelector('video[data-src]');
if (video) videoObserver.observe(video);
});
}
observeVideosInItems(listInstance.items);
listInstance.addHook('afterRender', (renderedItems) => {
observeVideosInItems(renderedItems);
});
}]);
A few things worth noting here — window.FinsweetAttributes.push(['list', callback]) is the v2 API (v1 used window.fsAttributes and 'cmsload'). The afterRender hook fires each time new items hit the DOM, whether from pagination, load more, or initial render. And renderedItems gives you just the new batch, so you’re only observing what’s freshly added.
Your video markup should look like this — note the src is intentionally omitted:
<video
data-src="[your-cms-video-url]"
poster="[your-cms-poster-url]"
preload="none"
playsinline
muted
></video>
There’s also a MutationObserver approach if you’d rather not use the Finsweet callback API — it watches the Collection List for childList additions and is more framework-agnostic. That said, the afterRender hook is more direct when you’re already on Attributes v2.
Could you share a staging or read-only link to your project?
We’d like to see how you’re storing the video URLs in the CMS and make sure the hook integrates cleanly with your setup. 