Hi!
I am trying to enable sound on an html embedded video when clicking on it.
I tried this script below.
It works but, when I use more videos it affects every video on the page, so when I click the first video all the videos start to sound. So I will need some help to only affect the video I am clicking on.
I set the ID #videoonclick to the video.
<script>
$("video").prop('muted', true);
$("#videoonclick").click( function (){
if( $("video").prop('muted') ) {
$("video").prop('muted', false);
} else {
$("video").prop('muted', true);
}
});
</script>
Thank you!!!
Lara
Here is my site Read-Only: https://preview.webflow.com/preview/lara-guell-2?utm_medium=preview_link&utm_source=designer&utm_content=lara-guell-2&preview=a21fa7a9a818dbbf494190894afd126a&mode=preview