I have such code (for example):
<script>
$('audio').mediaelementplayer();
</script>
<audio id="mejs" controls="controls">
<source src="/media/file-2.mp3" type="audio/mp3" />
</audio>
<ul class="mejs-list">
<li>/media/file-1.mp3</li>
<li class="current">/media/file-2.mp3</li>
<li>/media/file-3.mp3</li>
</ul>
I need to play audio files from the list by queue (one after another).
How can I change the source of the audio for the next file from the list after finishing playing current file and start playing the next one?
Update: related topic about mediaelement.js and playlist but the answer is about using many mediaelementplayer() instances.
Now there is a plugin that solves this task - https://github.com/duozersk/mep-feature-playlist
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With