如何在HTML中将视频的音频输出设置为静音?

使用静音 属性将视频的音频输出设置为静音。您可以尝试运行以下代码以实现静音 属性-

示例

<!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>