I’d do the following:
-
Set the video element to be hidden or even collapsed on load via the Property panel .
-
When the page loads and the dataset ready check if the field has a value. In the case the value exists, show the element.
Here is a sample code you can adapt by changing the IDs of your dataset, video field, and video element.
$w.onReady(function () {
$w("#dataset1").onReady(()=>{
if($w("#dataset1").getCurrentItem().videoField){
$w("#myVideoElement").show();
}
});
});