CMS Development

andrew19
Contributor

Adding a video play button option

SOLVE

Hi

We have successfully added a video module to our website, which for 99% of the time works without any issues as it auto plays and scales to the device

We have found that if a mobile user has dissabled autoplay on video's, then there is no option to play the video.

At one level this is not an issue but I would like to see if there is an option to add a play button.

Does anyone have an option to add a video play button? 

Thanks

0 Upvotes
1 Accepted solution
stefen
Solution
Key Advisor | Partner
Key Advisor | Partner

Adding a video play button option

SOLVE

@andrew19 if you're using a vanilla HTML5 Video tag then you just need to add the "controls" attribute to it like so:

<video controls autoplay>

That's the simplest solution. Otherwise you would need to use your own button element, CSS to style it/position it, and JS to play/pause the video on click.

Stefen Phelps, Community Champion, Kelp Web Developer

View solution in original post

3 Replies 3
stefen
Solution
Key Advisor | Partner
Key Advisor | Partner

Adding a video play button option

SOLVE

@andrew19 if you're using a vanilla HTML5 Video tag then you just need to add the "controls" attribute to it like so:

<video controls autoplay>

That's the simplest solution. Otherwise you would need to use your own button element, CSS to style it/position it, and JS to play/pause the video on click.

Stefen Phelps, Community Champion, Kelp Web Developer
andrew19
Contributor

Adding a video play button option

SOLVE

Hi Stefan

Soory for the slow response but have been working on other key sales issues.

Thank you for suggestion 

Perfect

Cheers

Andrew

0 Upvotes
sharonlicari
Community Manager
Community Manager

Adding a video play button option

SOLVE

Hey @andrew19 

 

I will tag a few of our experts Emoticono feliz     

 

Hey @stefen @Kevin-C @Stephanie-OG  could you please share your knowledge with @andrew19 ?

 

Thank you,

Sharon 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Upvotes