“Java mp3 player” Respostas de código

mp3 player java

public void playSound() {
    try {
        AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(new File("D:/MusicPlayer/fml.mp3").getAbsoluteFile());
        Clip clip = AudioSystem.getClip();
        clip.open(audioInputStream);
        clip.start();
    } catch(Exception e) {
        System.out.println("Error with playing sound.");
        e.printStackTrace();
    }
}
LoLGamer1002

Java mp3 player

import java.io.File;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;

String bip = "song.mp3";
Media hit = new Media(new File(bip).toURI().toString());
MediaPlayer mediaPlayer = new MediaPlayer(hit);
mediaPlayer.play();
slapp kuk

Respostas semelhantes a “Java mp3 player”

Perguntas semelhantes a “Java mp3 player”

Mais respostas relacionadas para “Java mp3 player” em Java

Procure respostas de código populares por idioma

Procurar outros idiomas de código