Hi Shirli,
Here is how to achieve this:
-
In the url field in your collection, in the items where you don’t have videos add a dummy place holder url. something like: ’ http://placeholder.com ’
-
In the code you need to use the getCurrentItem function to get the data and then check it looks something like this (videosrc is the name of the url field) :
$w . onReady ( function () {
$w ( ‘#dynamicDataset’ ). onReady (()=>{
let currentItem = $w ( ‘#dynamicDataset’ ). getCurrentItem ();
console . log ( currentItem )
if ( currentItem . videosrc === ‘http://placeholder.com’ ){
$w ( '#videoPlayer1' ). hide ();
}
})
});