I have this fairly simple script that displays a html5 audio player. The player play's a file and when it's done, it plays a different file. It plays a different file because the php file redirects to a different mp3 every time. Is there a way to display the filename of the file currently being played in the player? or to check if it is playing a certain file?
The Jquery
$(document).ready(function(){
$("#player").bind("ended", function(){
this.src = "song.php?nocache="+new Date().getTime();
this.play();
});
});
And the html
<audio id="player" autoplay="autoplay">
<source src="song.php" type="audio/mpeg">
</audio>