Why does my repeater in Wix Code only load the first related video?

This is the code I am using to configure the repeater:

$w('#repeatervideos').onItemReady(($item, itemData) => {			
	const videoLinks = [
		itemData.relatedvideo1,
		itemData.relatedvideo2,
		itemData.relatedvideo3
	].filter(link => link);
	console.log("videos encontrados", videoLinks);

	if (videoLinks.length > 0) {
		$item('#videoPlayer1').src = videoLinks[0];
		$item('#videoPlayer1').show();
	} else {
		$item('#videoPlayer1').hide();
	}
});
$w('#repeatervideos').data = res.items;

I can confirm that relatedvideo2 and relatedvideo3 have values in some cases, as they appear in the console.log(videoLinks), but are not shown in the repeater.
I want to know how to modify my code or my configuration so that the repeater can display all available videos in the data, not just the first one.

Is there something in my logic or configuration that is limiting the repeater to only one video? I would appreciate any help or practical examples.

$item('#videoPlayer1').src = videoLinks[0]

“Set the #videoPlayer1 element’s source to the FIRST ELEMENT of the videoLinks array”

1 Like