Can I use velo to add a video delay from the pro gallery in expanded mode?

I’m having trouble with
I’d like to add a slight delay before each video plays when clicked from the Pro gallery.

What I’m trying to do
I’m trying to make sure the play controls have disappeared before the video plays after being clicked in the pro gallery. This is to ensure that the video can be watched from the very first frame, without being disrupted by the controls lingering before they fade.

What I’ve tried so far
I’ve looked at Dev mode but can’t find where to add the code because it seems to apply to the gallery, not the video player itself once it expands.

Extra context
I’ve found this code, but can’t find a context to place it in because the video player I’d like to apply it to only appears in expanded mode.

$w.onReady(function () {

// Replace #videoPlayer with your actual video player ID

const videoPlayer = $w('#videoPlayer');

// Delay in milliseconds (e.g., 3000ms = 3 seconds)

const delay = 3000;

// Pause it initially, then play after the delay videoPlayer.pause(); setTimeout(() => { videoPlayer.play(); }, delay); });

Try this… Instead of Gallety, Use a Repeater. Add a Video Player in the repeater with each repeater item showing a different Video. Finally, change the video player element ID to “videoPlayer”

Thanks for your response. I appreciate it. Unfortunately using a repeater opens up a bunch of other Wix issues. Ideally, I’d like to retain the structure of using a pro gallery, but simply delay the video play until the controls have disappeared.

I also failed to mention that I’m using Wix Editor, not Studio. This may limit the possibilities.

You can Hide the Play Button from the Advanced Settings and Set the Video to auto play or play on click.

Thank-you again. The play button is already hidden on the pro gallery (it’s set to play on click - because auto play videos are muted in web browsers), but the problem occurs when it goes into the actual video regardless. It’s mostly a problem on the mobile site when the play controls completely cover the vision for the first couple of seconds. See picture.

Another solution, if the possibility exists, is to disable the play controls completely until a mouse-over. I also don’t know how to do that.

do you have the link to the page with videos?