When trying to play a single MP3 file, the code below is designed to skip to a specific part of the track and then start playing from that position. However, despite the cursor moving to the correct spot in the MP3, it fails to play upon clicking the Start button.
<!DOCTYPE html>
<html>
<head>
<title>Song Limit</title>
</head>
<body>
<div style="margin: 20px; text-align: center;">
<audio id="myVideo" controls>
<source src="gpj.mp3" type="video/mp4">
<source src="gpj.mp3" type="video/ogg">
Your browser does not support HTML5 video.
</audio>
<p>
<b> Run Audio From Starting Point </b></br>
<a onclick="setCurTime(0)" href="javascript:void(0)">Start from 0 sec</a>
</p>
<br>
<p>
<b> Run Audio From Starting Point </b></br>
<a onclick="setCurTime(20)" href="javascript:void(0)">Start from 20 sec</a>
</p>
<br>
<p>
<b> Run Audio From Starting Point </b></br>
<a onclick="setCurTime(35)" href="javascript:void(0)">Start from 35 sec</a>
</p>
<br>
<p>
<b> Run Audio From Starting Point </b></br>
<a onclick="setCurTime(47)" href="javascript:void(0)">Start from 47 sec</a>
</p>
</div>
<script>
var vid = document.getElementById("myVideo");
function setCurTime(time_start) {
vid.currentTime = time_start;
}
</script>
</body>
</HTML>
</html>