-
paulliu819
How to add a background video to my page hero
my video is https://www.youtube.com/watch?v=lsQ2IWmg8pI
The container where I want to add the video https://tinyurl.com/25hs3wsr
-
Hi there,
You can follow this method from our documentation on how to achieve that:
https://docs.generatepress.com/article/background-video/ -
paulliu819
Yes, but i can not understand that, still need your helps in step guide according to my example pages
-
The steps are very clear, I wrote the article with screenshots, and most users can follow the steps without issue.
Can you let me know which part or step you don’t understand?
-
paulliu819
i dont know how to make this Custom HTML?
and my video is https://www.youtube.com/watch?v=lsQ2IWmg8pI
-
Hi there,
you would need to host the video somewhere else, as you need an absolute link to the video file, and Youtube doesn’t provide that.
Once you have the video file in a place you can stream from you would follow the documentation above.
The Custom HTML you need is this:<video loop muted autoplay playsinline poster="URL/TO/poster.jpg" class="background-video"> <source src="URL/TO/video.mp4" type="video/mp4"> </video>
Within the HTML there are sources you need to update:
1.
poster="URL/TO/poster.jpg"
This isn option, the SRC Image file will be used as a poster image. This will get displayed if the video doesn’t load.2.
src="URL/TO/video.mp4"
The URL here needs to be updated to the video URL. -
paulliu819
hi david
thanks for your reply, always guide with detailsI have done with steps 1, 3 4,
I added the video and pls check the URL https://www.uusguide.shop/home-2-2/
still some issues below
1. I don’t find the Outer z-index, https://prnt.sc/g9DRop2gaAp2
but I find this one and put the number 1 here https://prnt.sc/R02Me1G9cgVg
please let me know they are the same thing or not?2. SRC Image – I added the SRC Image, it seems that the video is auto-play, don’t see the SRC Image, how to adjust the settings to see this playing button like this one https://prnt.sc/YROWROXcc4vF
3. how to change opacity option to looks good experience? now it is too much white. maybe this https://prnt.sc/hx9Dw0pdoGwA is good effect, or this one https://prnt.sc/FV_zNckJR8Z6 ? then background video and text both are clear
4.how to keep the original video quality? now it is not high-resolution?
please help me to fix that, thanks
-
1. Thats the correct setting for the Z-Index.
2. You can’t add a Play button a Background Image. It would require custom development to achieve that.
3. select the outer container block and go to the Background. settings:
3.1 Add a Gradient Background
3,2 set the SELECTOR to Pseudo Element.
3.3 set the 2 colors to a transport color of your choice.This will add a gradient overlay on top of the background video.
4. The quality of the video is set by the video file itself it’s not something we have control over.
How does the video quality look if you just view the URL ? AS you may need a larger video resolution if it’s being stretched to fill the background.
- You must be logged in to reply to this topic.