gpt4 book ai didi

javascript - 设置HTML5音频位置

转载 作者:行者123 更新时间:2023-12-03 02:11:19 25 4
gpt4 key购买 nike

如何在 HTML5音频元素中跳到某些时间偏移?

他们说您可以简单地设置他们的 currentTime property(强调我的):

The currentTime attribute must, on getting, return the current playback position, expressed in seconds. On setting, if the media element has a current media controller, then it must throw an INVALID_STATE_ERR exception; otherwise, the user agent must seek to the new value (which might raise an exception).



las,它似乎不起作用(我需要在Chrome中使用它)。

有类似的问题,但是没有答案。

最佳答案

适用于my chrome ...

$('#audio').bind('canplay', function() {
this.currentTime = 29; // jumps to 29th secs
});

关于javascript - 设置HTML5音频位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23713504/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com