Site logo

Archived topic

Home Background Video Settings

8 replies · Started by Soma on March 8, 2017

Viewing posts 1–9 of 9

Hi,

First: Nice theme, fast, beautiful and well done. Thank you. :)

I`ve some questions related to using video as background:

· <strong>It is possible to control how many repetitions the video will play?</strong> it is an infinite loop currently and cannot find where should I change it.

· What about default play controls? like <strong>"play/pause" buttons</strong>?

· <strong>What are the recommended settings for the video itself?</strong> I`m trying with different dimensions like 1696 × 1080, or 1920 × 996 but the video gets cropped on the bottom part. Is there a recommended dimensions to avoid this as much as possible?

It's only possible to disable the video loop outright:

add_filter( 'generate_page_header_video_loop','__return_false' );

Adding PHP: https://docs.generatepress.com/article/adding-php/

There's not really one main size for background images, as it all depends on the video resolution.

It's best to keep the video size as small as possible (no long videos), and use an overlay color to hide any loss of quality.

Hi Tom,

I`ve tried the code below to reproduce home video background just once but does not work; there is still an infinite loop.

I`m using a ".mp4" video in the page header settings, I tried the snippet in both the child and the parent theme functions with same result..
any ideas?

Cool

It was the "merge site header" option activated; after turning off the snippet of the previous link just works.

Thank You

mmm not really,

I just realize that by turning off the "merge with site header" video loop is deactivated BUT,
the video now is not covering the header area which I want to,

Is there any middle point where I can still using "merge with site header" option in conjunction with vthe video loop turned off ?

Not currently, it's a known bug which will be fixed in the next update.

I'd like to add a play/pause button so that my bg video can be paused by the user. I wasn't clear from Tom's comment ("It’s only possible to disable the video loop outright:") if that means adding such functionality is not doable. See: here. Thank you.

Yeah it's not possible to add a play/pause button on background videos as they are not video players.

Disabling the video loop means that the video will only play once instead of repeating.

This archived topic is closed to new replies.