Audio Player for http://workingdraft.de/.
Install via npm or yarn
You need to import this module’s styles to get a decent styling.
Add your audio file to HTML and wrap it in a container.
<divdata-my-app><audiopreload="auto" data-audio-player><sourcesrc="/test.mp3" type="audio/mpeg"></audio></div>Within your script you now need to initialize the player by building the markup and running the player’s functions.
import{Player}from'wd-audio-player'constconfig={// …}constelement=document.querySelector('[data-my-app]')newPlayer(element,config).initialize()This project is under MIT license.