Mute / Unmute button

Hello,

I embedded a video on my website using the following code:

video width=‘100%’ autoplay=‘true’ playsinline=‘’ loop=‘true’ muted='true'>

<source src='https://www.dropbox.com/s/4oryvq13ywcu3jm/video_sample.mov?raw=1' type='video/mp4'

is there a way to create a button that toggles the mute on and off?

hey…
this is possible yes.

add this in the videotag: class=“video1”

and add this inside the before section, where the “$(‘[data-id=5fae55fd3763d800cdfe4f29]’)” represents your button.

<script>
$('[data-id=5fae55fd3763d800cdfe4f29]').on('click', function() {
       
    $(".video1").prop("muted", !$(".video1").prop("muted"));
    });

});
</script>

haven´t tested it, but this will give you the right direction though.

Hello!
did you get to make it work? I tried but the button is not recognized :frowning:
is there another way to do this?
thanks!