0

I have created a video in a slider, in order for there to not be a start and stop button. But I would like to add a mute button, so if there is a video with sounds, then the user will be able to mute it. Does anyone please know how can add a mute button to the video in the slider.

Video here: http://wearecrunch.net/dasket/test/

CroMagnon
  • 1,218
  • 7
  • 20
  • 32

1 Answers1

0

The idea is:: you need to create a button in your HTML, change the CSS to make it looks nicer and then add the JS as controller I don't want to go too deep to modify your code, since it is in WordPress, but some thing just like: Mute And then for the JS:

$("#mute").click( function (){
if( $("video").prop('muted') ){
    $("video").prop('muted', false);
    $("#mute").html('unmuted');
}
else {
    $("video").prop('muted', true);
    $("#mute").html('muted');
}
});

I found this question may help you: Video mute/unmute with jQuery

Community
  • 1
  • 1
Oscar Zhang
  • 380
  • 3
  • 9