How To Make Video Player Disappear After Playing?

Hello WIX Community, was hoping someone could help me with a pretty simple request.

Basically, I have a video I want to play when a page loads and once the 2-3 second video ends I want the video player to basically collapse or hide so the rest of the page displays (basically trying to animate the home page at first and then have our normal home page shown).

At the moment, this is the only line of code I have but as you can imagine - it’s not working - hence why I’m here.

This is basically where I’m starting:

export function videoPlayer1_ended(event) }

Thanks in advance!

Any help here? Still can’t figure it out unfortunately.

have to tried ALT+F4 ?

if that doesn’t work try this

setTimeout(() => {
$w(“# videoPlayer1”).hide();
}, 5000);

@mikemoynihan99 right now we have this but even using console.log(“test”) we don’t see that run in the console log so not sure what we’re doing wrong.

code here:

$w.onReady( function () {
//TODO: write your page related code here…

console.log("test") 
setTimeout(() => { $w("#videoPlayer1").hide(); }, 5000); 

//Add your code for this event here:
}

@anil

$w.onReady( function () {
//TODO: write your page related code here…

console.log("now its working"); 
setTimeout(() => { $w("#videoPlayer1").hide(); }, 5000); 

//Add your code for this event here:
})

And, did you fix your problem yet? I have the same wish, but cannot realize this with Wix… but i also cannot ready/ understand your code language… can you help out? Many thanks

Please add your own issue into a new post instead of bumping up an old post. Explain what you are trying to do, what works, and what doesn’t. Also, add any code in a code block as stated in the Forum Guidelines.

Sinc you don’t understand code, y ou will need to familiarize yourself with basic coding concepts to accomplish what you want. There are a wealth of Javascript coding sites which will help you learn Javascript from basic to advanced - Javascript.info is a good one. The Corvid Resources page provides tutorials, examples , and articles on getting the most out of Corvid. We are happy to get you pointed in the right direction, but you’ll need to take it from there. As questions or difficulties arise, we are here to help.

This post is an old post and is being closed.