Click here to Skip to main content
15,886,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All,

My first post here... :-)

I'm fairly new to web development and I've just been tasked this and I don't know where to start.

I would like to embedded a video into the homepage of a website. When people visit they see the video (with audio) once, then the video loops (and the audio mutes)

Is this possible with the audio in the mp4 OR should I make two separate files? I'm assuming I use javascript to achieve this?

Any tips / pointers greatly appreciated. In the meantime I will keep researching.

thx!

What I have tried:

I am googling trying to find a solution, but so far no luck, hence why I'm posting here. Currently using this

Quote:

<source src="/sites/default/files/HOMEPAGE_HEADER_VIDEO.mp4" type="video/mp4" />
Posted
Updated 30-Oct-19 13:32pm

1 solution

This is only possible if the player you have in your page supports muting the audio from javascript code. I don't know of any myself.

But, there's a reason why NOBODY worth their weight has sound on their web pages when they load. It's annoying and makes people hit "close tab" faster than they hit the mute button.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900