@zvonokcom/audio-player.js
v1.1.0
Published
Audio Player
Downloads
11
Readme
Install
npm install @zvonokcom/audio-player.js
Usage
<div class="audio ct-audio-player">
<audio preload="none">
<source src="..." type="audio/mpeg">
</audio>
</div>
<script src="audio-player.js"></script>
<script>
player = new CtPlayer(document.querySelector(".ct-audio-player"));
player.initPlayer();
</script>
Or with jquery
$('.ct-audio-player').each(function() {
player = new CtPlayer(this);
player.initPlayer();
});
Use regions plugin
<script src="audio-player.js"></script>
<script>
player = new CtPlayer(document.querySelector(".ct-audio-player"), true);
player.initPlayer();
</script>