Adding youtube video in dynamic page

Hi friends,
i am trying to create dynamic page and try to add youtube URL link of my website so video will change based on the dynamic page changing.

Assuming you’ve already created a dynamic page
(if not, follow the article: https://support.wix.com/en/article/how-to-add-a-dynamic-item-page)
Add → Video → YouTube (Single Video Players) → Connect to Data
and select the proper field ( referenced field must be of URL type! )

Same issue but when I add the data it still defaults to the URL in the video settings (the Gear tab) and wont let me leave the link box blank?

Hi @skubado ,
Please send screenshots of the problem so we can help you figure it out.

#HappyThursday and thank you for the quick response! The red circle is the default link. If I remove that it just defaults back to it. The red underline is my link to the data-set. If you can advise me which video player to use on a dynamic user profile page that would be great! Thanks again!!
regards,
Rob

Any Luck?

Also have this problem, still doesn’t seem fixed. URL out of database is not loading in the video URL. I also do a check if there is a URL divined and hide or show the video based on that. The IF statement also returns false as if there is no value in the database field of this dynamic page, while the same show/hide function does work for a normal wix video (not URL but FILE based).

Code I use :

$w.onReady(() => {
$w(“#dynamicDataset”).onReady(() => {
// Gets the current item properties and stores them in a variable called item
const item = $w(“#dynamicDataset”).getCurrentItem();
// Checks if the current item has a value in the “video” field
if (!item.video) {
// Collapses the video player if there is no value for “video”
$w(“#videoPlayer1”).collapse();
}
if (!item.youtubeurl) {
// Collapses the video player if there is no value for “video”
//$w(“#videoPlayer2”).collapse();
}

}); 

});

I don’t know why, but it suddenly works now…