HTML audio can’t set currentTime

You need to do something like this (if you use jQuery)

$('#elem_audio').bind('canplay', function() {
  this.currentTime = 10;
});

or in Javascript

var aud = document.getElementById("elem_audio");
aud.oncanplay = function() {
    aud.currentTime = 10;
};

The reason behind for this setup is you need to make sure the audio is ready to play.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)