Collapse video in repeater

Hi everyone! I have really tried so many different codes (and am new to coding). I searched literally all night and have tried my best! I reviewed coding for collapsing a video when URL is not present, and when I insert that code, it fails with “URL” must be present. When I try the repeater collapse function, it shows the same video over and over. It seems I’m stuck at including video collapsing IN a repeater.

Here are my details:
I have a repeater (repeater1) which pulls from #dataset1 (it’s a dynamic page where Projects (Project Name–a project is a “class”) are pulled, and then linked to corresponding lessons. There could be 12 lessons associated with every one project. The repeater lists all of the lesson content and then repeats. Some lessons will not have a video along with the lesson. I want to collapse the player if there isn’t a video )

HELP!?

$w.onReady(() => {
$w("#repeater1").onItemReady(($i, iData) => {
if(!iData.videoSrc){$i("#videoPlayer1").collapse();}
})
})

//Note: replace the elementId's and the fileldkey your prop id and key.

I get the following code error and all videos then go missing:

Wix code SDK error: The “src” property cannot be set to “”. It must be a valid image URL starting with “http://”, “https://” or “wix:image://”, or a valid video URL starting with “wix:video://”.

$w.onReady(() => {
$w( “#repeater1” ).onItemReady(($i, iData) => {
if (!iData.videoLesson){$i( “#videoPlayer3” ).collapse();}
})
})

Also tried this model and still get the URL must contain error.

$w( “#repeater1” ).onItemReady(($item, itemData, index) =>{
// Gets the current item properties and stores them in a variable called item
const item = $w( “#dataset1” ).getCurrentItem();
// Checks if the current item has a value in the “postImage” field
if (!item.videoLesson) {
// Collapses the image if there is no value for “postImage”
$item( “#videoPlayer3” ).collapse();
}
});

AND

$w.onReady(() => {
$w( “#repeater1” ).onItemReady(($item, itemData) => {
if (!itemData.videoLesson){$item( “#videoPlayer3” ).collapse();}
})
})