Package javafx.scene.media

Examples of javafx.scene.media.MediaPlayer.play()


            e.printStackTrace();
        }
        JFXPanel fxPanel = new JFXPanel();
        Media media=new Media(mp3.toURI().toString());
        MediaPlayer mediaPlayer=new MediaPlayer(media);
        mediaPlayer.play();
        if(mp3.exists()){
            mp3.setWritable(true);
            System.out.println(mp3.delete());
            mp3.deleteOnExit();
        }
View Full Code Here


            synchronized (mediaPlayer) {
              mediaPlayer.notifyAll();
            }
          }
        });
        mediaPlayer.play();
        try {
          mediaPlayer.wait(MAXIMUM_PLAY_TIME_PER_MP3);
        } catch (InterruptedException e) {
          LOGGER.error("Interrupted while waiting for " + mediaPlayer + " to complete play of " + mp3File);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.