java - How to play sound order by order? -


I need to play sound file sequence by order with the media player. If I use the setOnCompletionListener, then the code is going to be such a long time:

  one.start (); One.setOnCompletionListener (New MediaPlayer.OncompletionListener) {Ending at Public Zero (Media Player MP) {Two. Start (), two .Seton expiration listener (new media player.oncompletion listener) {end at public zero (media player MP) {two start (); ... three four ...}}); }});  

Is this a more practical way?

The only change is the player's source in the next media.

  one.start (); One.setOnCompletionListener (New MediaPlayer.OnCompletionListener) {Ending at Public Zero (Media Player MP) {one.setDataSource (loopthroughSources); // The list of an array or path path can be one.start ();}}); }});  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -