How to set the audio output of the video to mute in HTML?



Use the muted attribute to set the audio output of the video to mute. You can try to run the following code to implement muted attribute −

Example

<!DOCTYPE HTML>
<html>
   <body>
      <video width = "300" height = "200" controls muted>
         <source src = "/html5/foo.ogg" type = "video/ogg" />
         <source src = "/html5/foo.mp4" type = "video/mp4" />
         Your browser does not support the video element.
      </video>
   </body>
</html>
Updated on: 2020-03-03T10:27:59+05:30

394 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements