如何將 HTML 中的影片音訊輸出設定成靜音?


使用 muted 屬性可將影片的音訊輸出設定成靜音。可以嘗試執行以下程式碼以實施 muted 屬性 −

示例

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

更新於: 2020-03-03

345 次瀏覽

開啟你的 職業生涯

透過完成課程認證

立即開始
廣告
© . All rights reserved.