hi waitek,
i solved this problem quick and dirty by reloading the page and using a GET variable in the url to specify an audio file. i used php and will try to explain more:
my page containing the player ist called “playerContainer.php”. it has the player as you know it, only that the embed function will receive whatever parameter you give it in the url (i hope there is no security risk here):
<div id="player">
<script type="text/javascript">
AudioPlayer.embed("player", {soundFile: "https://www.droneband.de/juggerTemp/audio/<?= $_GET['audio'] ?>.mp3"
});
</script></div>
then you can create links from whereever you like to that page and pass the mp3 name wihout the “.mp3” ending. like this:
<a href="playerContainer.php?audio=audioFilenameWithoutMp3Ending">Sample</a>
works fine for me, although I wound prefer some way to pass the filename directly to the player via javascript. i hope this feature will be implemented in the future.
let me know if you need more explanations!