Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Great module :)
What do you think about adding the following features?
- Limiting the nodes on which the video background appears, e.g. only the home page?
- Providing the option to display the background holding image first if viewing on a mobile device, e.g. if the media breakpoint is less than 768px?
Many thanks,
Ali
Comments
Comment #2
arne.olafson CreditAttribution: arne.olafson commentedYou can do it with javascript, here's an example using Drupal.behaviors:
This code will run before the html video element gets rendered, so the not-front pages won't download the video
Comment #3
Vincent_Jo CreditAttribution: Vincent_Jo commentedHi,
#2, where to put this code?
regards
Vincent
Comment #4
arne.olafson CreditAttribution: arne.olafson commentedI generally create a js folder in my theme folder, and create a themename.behaviors.js file
A common method to call the file is to add a line to your themename.info file as follows:
scripts[] = js/themename.behaviors.js
Note that additional functions can be put in this wrapper as follows:
Comment #5
Vincent_Jo CreditAttribution: Vincent_Jo commentedGreat, thanks, that works!
regards
Vincent
Comment #6
ericfranzee CreditAttribution: ericfranzee commentedvideo plays on all mobile browser in a container and as sure make it impossible to view main site
would be nice if all mobile relies on image background rather the video background
please any way to fix this issue and how