I've found how to pause and play the video using jquery
But I can't find the mute button, if there isn't a jquery solution, I'm fine with just an onclick js solution. I need it asap.
Also is there a way to fix the mute delay? I want it to mute/unmute the sound as soon as the button is clicked.
$("video").prop('muted', true); //mute
$("video").prop('muted', false); //unmute
See all events here
(side note: use
attr if in jQuery < 1.6)
///Mute var video = document.getElementById("your-video-id"); video.muted= true; //Unmute var video = document.getElementById("your-video-id"); video.muted= false;
It will work for audio too, just put the element's id and it will work (and change the var name if you want, to 'media' or something suited for both audio/video as you like).
©2020 All rights reserved.