i’m hosting a video in an HTML element and the controls are hidden. the video will play and pause using the “onclick” parameter.
i want to provide my users with a toggle mute button. i tried to set a state that would add/remove the “muted” parameter in the HTML. this works but causes the video to restart, which is not acceptable for this use case.
i have found some javascript tutorials for customizing HTML5 video controls. before i go about teaching myself how to do this, i wanted to ask if there is an easier way to just simply mute the page instead?
thanks @Zeroic this is exactly what i was looking for.
i’ve added the code snippet to the HTML element and added the ID attributes to the both the HTML element and button, however the mute isn’t working yet. is there another step that i’m missing?