如何在 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/