The HTML Element
Here is the audio element of html 5
<audio autostart="0" autostart="false" preload ="none">
<source src="my.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>
Now we are entering to the topic.Here we are creating four button.Those are play, pause, next, previous with audio player.
<a data-player="prev-track" class="btn prev" data-track-no="0" style="cursor: pointer;"><span class="fa fa-step-backward" style="margin-top: 15px;"></span></a>
<a data-player="play" class="btn play-btn" onclick="document.getElementById('xAudio').play()"><i class="fas fa-play" style="margin-top: 15px;"></i></a>
<a data-player="pause" class="btn pause-btn" onclick="document.getElementById('xAudio').pause()"><span class="fa fa-pause" style="margin-top: 15px;"></span></a>
<audio id="xAudio" autostart="0" autostart="false" preload ="none" controlsList="nodownload" style="display: none;"></audio>
<a data-player="next-track" class="btn next" data-track-no="1" style="cursor: pointer;"><span class="fa fa-step-forward" style="margin-top: 15px;"></span></a>