/    Sign up×
Community /Pin to ProfileBookmark

Video as background

Help!

I’m trying to play a video as my ground image, the video is 45 seconds long and set to loop. It’s 100vh and 100vw with an opacity dialed down on it thus giving it a background look and feel to it.

My questions are around performance or best practice.

1) How can I pause or delay the video playing until downloaded?
2) I think my video has been cached and only plays the first 15 seconds currently then loops – how can I avoid this? although I’ve also opened the video directly and played the whole video then refreshed the tab but still doesn’t work and it’s been several days.
3) Is there a way to load my page THEN download the video after so it doesn’t effect the SEO scoring of my page

to post a comment
Full-stack DeveloperHTML

2 Comments(s)

Copy linkTweet thisAlerts:
@SempervivumMar 19.2022 — 3) Use the load event for window for setting the src attribute of the video tag:

https://developer.mozilla.org/de/docs/Web/API/GlobalEventHandlers/onload

1) I don't know about an event "loaded completely" for video, however "canplaythrough" should be sufficient.

2) I didn't encounter such issue yet. Can you provide the URL where it occurs?
Copy linkTweet thisAlerts:
@flipkartsSep 19.2022 — https://flipkarts.net/ offers a wide range of products, including cosmetics, skincare, hair care, Home, Kitchen, sports wear, Jewlery, Garments, and more. I am always working to improve my website and provide the best possible experience for my customers.
×

Success!

Help @singaporeDude spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...