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
Post a Comment