I’ve been trying to find a solution on this board but unfortunately couldn’t find the answer.
I have a 10s video to make it as a banner. I converted the file to gif and used IMAGE BANNER on the Dawn theme, but the quality is not good. I found an answer on this board on how to use the custom liquid. I used this code and the video is now there as what I wanted.
<div class="ov
<p>erlay"></p>
</div>
<p>However, I do not know how to do overlay text and create a button on it. I can do this using IMAGE BANNER (with the gif), but now with an mp4 file in custom liquid, I don’t know how to do it.</p>
<p>Please if you can help me with this.</p>
<p>Thanks in advance.</p>
Within the “sections/image-banner.liquid” file. That should load the video whenever you do not select an image for use with the image banner section.
Ideally you would add an input for capturing the video URL and a checkbox for use with toggling it to use the video or an image to the section so that you can modify the video and whether or not it is used from the Theme Editor itself instead of needing to go into the code each time you want to make a modification like that.
Thanks @RobDukarski I will try this. Meaning that with this code I can put a video using the IMAGE BANNER. Currently I can only use photos or gif files.
As long as the video can be played in that capacity it should work. I know some video content needs to be embedded with an “iframe” and others will not load the content outside of a specific request with them as the referring party.
If you do just use that code you have then you should note that to change the video you would need to go back into the code each time. Also remember no image can be selected within the section in order for that to work.
Very helpful solution but unfortunately I wouldn’t be able to apply to my theme which is out of the sandbox Flex theme, anyone know how to apply this to the Flex theme?