Hi, I've been looking for how to play an mp3 audio but they still don't work for me. I have tried with JavaFx Media class. How could I play the audio? without having to resort to external libraries.
Hi, I've been looking for how to play an mp3 audio but they still don't work for me. I have tried with JavaFx Media class. How could I play the audio? without having to resort to external libraries.
Using
JavaFX
the most common method is through the MediaPlayer classThis is an example, simply define the path of your .mp3 file and you will be able to play the audio without problem:
There is this form:
and here is the reference: