0
public class Jxplay extends Thread {

File f;

public Jxplay(File f){

    this.f=f;

}

public void run(){

    try{
        FileInputStream fis = new FileInputStream(f);
        Player jx = new Player(fis);
        jx.play();

    }
    catch(Exception e){
        e.printStackTrace();
    }
}

}

How to stop playback ?

Vinay Veluri
  • 6,671
  • 5
  • 32
  • 56
  • 2
    What is this Player component, JMF javax.media.Player or proprietary bean? EDIT: You probably mean http://docs.oracle.com/javafx/2/api/javafx/scene/media/MediaPlayer.html component? – Whome Sep 03 '14 at 10:53
  • I am using JLayer1.0.1 mp3 plugin jar for java – Deeptomay Roy Sep 03 '14 at 11:01
  • This is a duplicate to http://stackoverflow.com/questions/12057214/jlayer-pause-and-resume-song ? – DThought Sep 03 '14 at 11:03
  • Since it is run in thread you may need to set a class variable and conditionally stop the thread upon hitting an event. – bprasanna Sep 03 '14 at 11:22

0 Answers0