Adding Video File to Hero Image Background

Permalink Browser Info Environment
Good afternoon,

I am trying to add a video as a background element to the Hero image section of that block. Is there a way to edit the code so that the video will "autoplay".

The background video is working in some browsers (i.e. Safari on Mac OS and iOS) but not Google Chrome and Firefox.

Any help would be appreciated.

Sincerely yours,
Paul Hebert

Type: Ticket
Status: Archived
paulhebert
View Replies:
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Paul,

Thanks a lot for your purchase.

As far as I know its no longer possible to autoplay video in Chrome and Firefox, the autoplay policy was changed a couple of years back at a browser level effectively giving the choice to autoplay or not back to the user. Please leave it with me and I will investigate further, and get back to you.

Best regards

David
paulhebert replied on at Permalink Reply
paulhebert
Thanks for looking into this for me David.

I really like the look and styling of this template.

If it doesn't work out because of the browser's standards, do you foresee any issue using an animated PNG?

Best regards,

Paul Hebert
VidalThemes replied on at Permalink Reply
VidalThemes
I have to be honest it's not something I have tested in the hero unit, off the top of my head I cant see a huge problem with using an animated PNG or GIF, but I will also look into that for you if I draw a blank on the video.

Best regards

David
paulhebert replied on at Permalink Reply
paulhebert
Thanks again, David.

Your assistance is truly appreciated.

Best regards,

Paul Hebert
VidalThemes replied on at Permalink Reply
VidalThemes
Hi there Paul,

I have had a closer look at this today, and it looks like the autoplay video is a no-go, both Chrome and Firefox changed their autoplay policy and it seems like there is no clean way around it, unfortunately.

I have had a test with an animated PNG this morning and I can confirm it works and works well, a lot better quality than an animated GIF, and it works straight out the box no code alterations required as C5 just recognises it as a PNG.

I think the animated PNG is probably the way to go, I have added a note to the Modena road map to look at adding some video-based options for a hero unit, even if we cant get them autoplaying we may be able to get an elegant compromise.

Sorry I couldn't be of more help on this occasion.

Best regards

David
paulhebert replied on at Permalink Reply
paulhebert
Thanks for looking into this for me, David.

I was able to load an Animated PNG and it works fairly well. Not as smooth as a video, but provides a degree of animation that I feel is important.

I greatly appreciate your efforts with this request.

Best regards,

Paul Hebert
paulhebert replied on at Permalink Reply
paulhebert
Hi David,

Please check the home page of this link:

http://njadclub.org/

I was able to view the background video in Chrome.

If there are any updates to enhance the functionality of the Modena template, please keep me in the loop.

Thanks again.
VidalThemes replied on at Permalink Reply
VidalThemes
Hi Paul,

Thanks for the link. After having a look at the code powering the video it looks like its basically a youtube embed, they then use Javascript to "press" the play button, when someone opens the page, it's a bit of a hacky solution to be honest, and comes with a fair few drawbacks as listed on their official docs:

https://docs.elementor.com/article/387-section-background-video-opti...

It will only autoplay on mobile "if the device supports it" which currently isn't many if any, as further on they state "Upload a cover image, to replace the background video on mobile and tablet devices, as background videos are disabled on mobile devices to avoid browser restrictions and bandwidth draining." And you don't have any control over the youtube "suggestions" that play after the video ends.

It does play MP4 however, it would be interesting to see how this is handled and may give us some ideas.

we will certainly be looking at video options though in upcoming updates, as it is a nice effect to have. We will certainly keep you in the loop.

Best regards

David
cmerritt replied on at Permalink Reply
cmerritt
Hi Paul,

I used this to get a background video on the home page hero section of a site using Modena.

https://www.concrete5.org/marketplace/addons/video-background1...

It needed few CSS tweaks.

The site has not been launched but you can PM me for a link if you want to see it.


Colin
paulhebert replied on at Permalink Reply
paulhebert
Thanks, Colin.

That solution worked out great. I appreciate your assistance with this.

Best regards,
Paul Hebert
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

# concrete5 Version
Core Version - 8.5.4
Version Installed - 8.5.4
Database Version - 20200609145307

# Database Information
Version: 5.7.30
SQL Mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

# concrete5 Packages
Modena Theme (1.0.4), Video Background (1.1)

# concrete5 Overrides
None

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.43 (cPanel) OpenSSL/1.1.1g mod_bwlimited/1.4

# Server API
cgi-fcgi

# PHP Version
7.3.20

# PHP Extensions
bcmath, bz2, calendar, cgi-fcgi, Core, ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, PDO, pdo_mysql, pdo_sqlite, Phar, posix, readline, Reflection, session, SimpleXML, soap, sockets, SPL, sqlite3, standard, tokenizer, wddx, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib

# PHP Settings
max_execution_time - 300
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 240
max_input_vars - 3000
memory_limit - 268M
post_max_size - 100M
upload_max_filesize - 100M
mbstring.regex_stack_limit - 100000
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 7200
soap.wsdl_cache_limit - 5

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.