<audio src="file.ogg" type="audio/ogg" controls="controls"></audio>
为什么这个jQuery / JavaScript有效:
var audio = $('audio').get(0);
audio.play();
但这不是吗?:
var audio = $('audio').get(0);
audio.currentTime = 20;
audio.play();
答案 0 :(得分:4)
尝试
var audio = $('audio');
audio.bind('canplay', function() {
this.currentTime = 20;
});
audio.get(0).play();