简体   繁体   English

用于在html5音频中静音的预定义部分

[英]predefined sections to mute in html5 audio

newbie in front end dev. 前端开发新手 I've managed to use audio tag - really cool. 我设法使用音频标签 - 非常酷。

My need is to mute parts of the .wav that are predefined (for example mute between second 3 to second 8, and from second 32 to second 41) - meaning that if the user will listen to the wav, once getting to the configured sections - won't hear anything. 我需要将预定义的.wav部分静音(例如,在第二个3到第二个8之间静音,从第二个32到第二个41静音) - 这意味着如果用户将听取wav,一旦进入配置的部分 - 什么都听不到。

Is there a way to do it? 有办法吗? or cannot be done? 还是做不到?

使用.wav并不是最友好的交叉浏览器,但可以通过监视timeupdate事件来做你想做的事情,当它到达你想要的时间,例如3秒,将视频的mute值设置为true,然后更改当它达到8秒时它变为假。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM