Site icon Hip-Hop Website Design and Development

Listening for html audio participant occasions [closed]

CONTEXT

I created an "music album player" that makes use of common "click" listener occasions on numerous html mejs components which are generated from the shortcode. (e.g. When a person clicks on a listed tune the audio participant will change the displayed tune enjoying title and the audio supply to the chosen tune.)
The issue I’ve is that I wish to the browser to play the following tune within the record of accessible songs when the audio file has completed enjoying. I do know that the documentation says there may be an "ended" motion related to the MediaElementPlayer however I do not know learn how to hear for that ‘ended’ occasion. I’ve tried many various issues and I simply cannot appear to crack it.

PROBLEM

Is there some sort of approach I may connect a operate to the listener like:

jQuery(".mediaelement").on('ended', operate(){ ...choose subsequent tune code... });