Hubspot Video Player Customization

I am creating a module where I have to use the HubSpot built-in video field (It will be working as a background video player for the module)
There are two issues I’m facing with this:
1. Whenever I change the browser tab, the video gets automatically paused. How to prevent this?
2. And is there any way I can remove the pause button? (Hide it from the display)

Hi @MUlHuq,
Thank you for posting to the Community!
I’d like to tag in some of our Top Contributors to see if they have any ideas -- @Anton @Indra and @jeremymandle Have any of you all experienced this behavior before? If so, do you have any tips on resolving for @MUlHuq?
Thank you!
Cassie, Community Manager

Hi @MUlHuq,

I’m incredibly late to the party here but I just came across your question today.
It soulds like you’re using the video as a background so you don’t need any of the bells and whistles on the hubspot video player (CTAs, Forms, etc.)
In that case rather than use a Video Player Field in your module I’d suggest you use a File field and set the file type to video.

{{ module.file_field }}

Will output the url of the video file
From there you can do whatever you want with the raw file (i.e. create your own html video player that you can manipulate however you want.

{# Set up to get file type #}
{% set file_parts = module.file_field|split('.') %}
{% set file_type = file_parts|last %}

<video autoplay muted loop playsinline class="video-background-element">
 <source src="{{ module.file_field }}" type="video/{{ file_type }}">
 </video>

Barry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn

Hey There!
Yes, exactly I used File field for the background video, and it worked nicely.
However, to give customization access to the user-end HubSpot video field would have been nice. But File field is doing the job nicely.
Again, thanks for the suggestion.

@MUlHuq nice one! Glad you got it sorted!


Barry Grennan

Freelance HubSpot CMS Developer

Website | Contact | LinkedIn