html音频自定义时间,设置HTML5音频事件’timeupdate’的粒度

我很抱歉,但这是它的工作方式。从

html5 specs:

Every 15 to 250ms,or whenever the MediaController’s media controller position changes,whichever happens least often,the user agent must queue a task to fire a simple event named timeupdate at the MediaController.

也,

The event thus is not to be fired faster than about 66Hz or slower than 4Hz (assuming the event handlers don’t take longer than 250ms to run). User agents are encouraged to vary the frequency of the event based on the system load and the average cost of processing the event each time,so that the UI updates are not any more frequent than the user agent can comfortably handle while decoding the video.

如果您阅读了该规范,您可以得到这样的想法,即timeupdate事件是一种“尽力而为”的事件。它会发射,当它可以,永远只要不影响性能太多。

您可以过滤丢弃某些事件的事件,以平稳到达时间,但恐怕不可能做相反的事情。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值