I'm trying to play a song from a specific time code. This, document.getElementById('rock').play(); play the song from the beginning. Is there a way to choose the beginnning time? Thank you.
document.getElementById('rock').play();
The HTMLMediaElement.currentTime property gives the current playback time in seconds. Setting this value seeks the media to the new time.
let song = document.getElementById('rock');
song.currentTime = 35;