Audio player problem !!

Hey amigoses ^^
I'm a little bit stuck again with this time trying to make a mere mp3 player !!
Probabilly the most simple one !!
I have a list view that will contain the music titles but again, nothing comes that esay ^^
* To change this template, choose Tools | Templates
* and open the template in the editor.
package audioplayer;
import java.io.File;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ListView;
import javafx.scene.control.Slider;
import javafx.scene.input.MouseEvent;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.stage.FileChooser;
import javafx.stage.FileChooser.ExtensionFilter;
import javafx.stage.Stage;
* @author Minedun6
public class AudioPlayer extends Application {
    ListView list = new ListView();
    Button btn_load = new Button("Load File");
    Button btn_play = new Button("play");
    Button btn_stop = new Button("Stop");
    Button btn_pause = new Button("Pause");
    ObservableList<String> array;
    FileChooser chooser = null;
    File file;
    Media media;
    MediaPlayer player;
    Slider longeur;
    @Override
    public void start(Stage primaryStage) {
        list.setLayoutX(210);
        list.setLayoutY(10);
        list.setPrefSize(160, 260);
        btn_load.setLayoutX(295);
        btn_load.setLayoutY(260);
        btn_stop.setLayoutX(50);
        btn_pause.setLayoutX(100);
        longeur.setPrefSize(150,10);
        longeur.setLayoutX(5);
        longeur.setLayoutY(50);
        btn_load.setOnMouseClicked(new EventHandler<MouseEvent>(){
            @Override
            public void handle(MouseEvent t) {
               chooser = new FileChooser();
               ExtensionFilter mp3 = new ExtensionFilter("MP3 Files(*.mp3)", "*.mp3");
               ExtensionFilter aac = new ExtensionFilter("AAC Files(*.aac)", "*.aac");
               chooser.getExtensionFilters().addAll(mp3,aac);
                file = chooser.showOpenDialog(null);
               String fi = file.getAbsoluteFile().toURI().toString();
               String name = file.getName().toString();
               list.getItems().add(name);
                array = FXCollections.observableArrayList();
                array.addAll(fi);
                System.out.println(array);
        btn_play.setOnMouseClicked(new EventHandler<MouseEvent>(){
            @Override
            public void handle(MouseEvent t) {
                media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                player = new MediaPlayer(media);
                player.play();
        btn_stop.setOnMouseClicked(new EventHandler<MouseEvent>(){
            @Override
            public void handle(MouseEvent t) {
                player.stop();
        btn_pause.setOnMouseClicked(new EventHandler<MouseEvent>(){
            @Override
            public void handle(MouseEvent t) {
                player.pause();
        Group root = new Group();
        root.getChildren().addAll(list,btn_load,btn_play,btn_stop,btn_pause,longeur);
        Scene scene = new Scene(root, 400, 300);
        primaryStage.setTitle("Hello World!");
        primaryStage.setScene(scene);
        primaryStage.show();
     * The main() method is ignored in correctly deployed JavaFX application.
     * main() serves only as fallback in case the application can not be
     * launched through deployment artifacts, e.g., in IDEs with limited FX
     * support. NetBeans ignores main().
     * @param args the command line arguments
    public static void main(String[] args) {
        launch(args);
}I really tried to do something very simple but seems no !!
And by the way, the pause button, when i press on it, it should only pauses the play but seems it's making the player stop not pause ^^

Thx again !!
For the images/text, i'll be trying myself to do something and i hope this time i'll do it without yur help !!
As for the Mp3 Player, here is the code, would be nice of to see if there is something that can be added, perfectionized !!
* To change this template, choose Tools | Templates
* and open the template in the editor.
package audioplayer;
import java.io.File;
import javafx.application.Application;
import javafx.beans.InvalidationListener;
import javafx.beans.Observable;
import javafx.beans.binding.Bindings;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.control.Slider;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.AnchorPane;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import javafx.scene.paint.Color;
import javafx.scene.paint.LinearGradient;
import javafx.stage.FileChooser;
import javafx.stage.FileChooser.ExtensionFilter;
import javafx.stage.Stage;
import javafx.util.Duration;
* @author Minedun6
public class AudioPlayer extends Application {
//Creating the GUI Form
    Button btn_play = new Button("Play");
    Button btn_pause = new Button("Pause");
    Button btn_stop = new Button("Stop");
    Button btn_previous = new Button("Prev");
    Button btn_next = new Button("Next");
    Button btn_load = new Button("Load");
    ListView list = new ListView();
    ObservableList array = FXCollections.observableArrayList();
    FileChooser choose;
    File file;
    Media media;
    MediaPlayer player;
    Slider status = new Slider();
    Slider volume = new Slider();
//End of GUI
    @Override
    public void start(Stage stage) throws Exception {
        //Styling btn_previous
        btn_previous.setPrefSize(80, 30);
        btn_previous.setLayoutX(10);
        btn_previous.setLayoutY(330);
        //end of btn_previous
        //Styling btn_pause
        btn_pause.setPrefSize(80, 30);
        btn_pause.setLayoutX(100);
        btn_pause.setLayoutY(330);
        //end of btn_pause
        //Styling btn_play
        btn_play.setPrefSize(80, 30);
        btn_play.setLayoutX(190);
        btn_play.setLayoutY(330);
        //end of btn_play
        //Styling btn_stop
        btn_stop.setPrefSize(80, 30);
        btn_stop.setLayoutX(280);
        btn_stop.setLayoutY(330);
        //end of btn_stop
        //Styling btn_next
        btn_next.setPrefSize(80, 30);
        btn_next.setLayoutX(370);
        btn_next.setLayoutY(330);
        //end of btn_next
        //Styling list
        list.setPrefSize(280, 300);
        list.setLayoutX(500);
        list.setLayoutY(10);
        //end of list
        //Styling btn_load
        btn_load.setPrefSize(80, 30);
        btn_load.setLayoutX(600);
        btn_load.setLayoutY(330);
        //end of btn_load
        //Styling status slider
        status.setPrefSize(450, 10);
        status.setLayoutX(10);
        status.setLayoutY(290);
        //end of status slider
        //Styling volume slider
        volume.setPrefSize(100, 10);
        volume.setLayoutX(350);
        volume.setLayoutY(310);
        volume.setValue(100.0);
        volume.setMin(0.0);
        volume.setMax(100.0);
        //end of volume slider
        btn_play.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
        btn_next.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
        btn_previous.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
        btn_pause.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
        btn_stop.disableProperty().bind(Bindings.isEmpty(list.getSelectionModel().getSelectedItems()));
        list.setOnKeyReleased(new EventHandler< KeyEvent>(){
            @Override
            public void handle(KeyEvent t) {
                if(t.getCode() == KeyCode.DELETE){
                    list.getItems().remove(list.getSelectionModel().getSelectedIndex());
                    array.remove(list.getSelectionModel().getSelectedIndex());
        btn_load.setOnMouseClicked(new EventHandler<MouseEvent>() {
            //Evenement associé au clic du bouton Load
            @Override
            public void handle(MouseEvent t) {
                //Ajout des Filtres de choix !!
                ExtensionFilter mp3 = new ExtensionFilter("MP3 Files(*.mp3)", "*.mp3");
                ExtensionFilter aac = new ExtensionFilter("AAC Files(*.aac)", "*.aac");
                choose = new FileChooser();
                choose.getExtensionFilters().addAll(mp3, aac);
                file = choose.showOpenDialog(null);
                if (file != null) {
                    //Ajout à la liste pour stocker les titres chansons !!
                    String fi = file.getAbsoluteFile().toURI().toString();
                    String name = file.getName().toString().substring(0, file.getName().toString().lastIndexOf("."));
                    list.getItems().add(name);
                    array.add(fi);
        btn_play.setOnMouseClicked(new EventHandler<MouseEvent>() {
            //Evenement associé au click du button play
            @Override
            public void handle(MouseEvent t) {
                if (!(list.getItems().isEmpty())) {
                    //player.stop();
                    media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                    player = new MediaPlayer(media);
                    player.play();
                    player.setOnReady(new Runnable() {
                        @Override
                        public void run() {
                            status.setMin(0.0);
                            status.setValue(0.0);
                            status.setMax(player.getTotalDuration().toSeconds());
                            volume.setValue(100.0);
                            player.setVolume(100.0 / 100);
                            player.currentTimeProperty().addListener(new ChangeListener<Duration>() {
                                @Override
                                public void changed(ObservableValue<? extends Duration> ov, Duration t, Duration t1) {
                                    status.setValue(t1.toSeconds());
        status.valueProperty().addListener(new InvalidationListener() {
            @Override
            public void invalidated(Observable o) {
                if (status.isValueChanging()) {
                    player.seek(Duration.seconds(status.getValue()));
        volume.valueProperty().addListener(new InvalidationListener() {
            @Override
            public void invalidated(Observable o) {
                if (volume.isValueChanging()) {
                    //le volume doit être divisé par 100 pour ressentir la dégradation du volume
                    //sinon ça passe trop vite
                    player.setVolume(volume.getValue() / 100);
        btn_next.setOnMouseClicked(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent t) {
                if ((list.getItems().size() != 0) || (list.getItems().get(list.getItems().size() + 1) != null)) {
                    player.stop();
                    list.getSelectionModel().selectNext();
                    media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                    player = new MediaPlayer(media);
                    player.play();
                    player.currentTimeProperty().addListener(new ChangeListener<Duration>() {
                                @Override
                                public void changed(ObservableValue<? extends Duration> ov, Duration t, Duration t1) {
                                    status.setValue(t1.toSeconds());
        btn_previous.setOnMouseClicked(new EventHandler<MouseEvent>() {
            @Override
            public void handle(MouseEvent t) {
                if ((list.getItems().size() != 0) || (list.getItems().get(-1) != null)) {
                    player.stop();
                    list.getSelectionModel().selectPrevious();
                    media = new Media(array.get(list.getSelectionModel().getSelectedIndex()).toString());
                    player = new MediaPlayer(media);
                    player.play();
                    player.currentTimeProperty().addListener(new ChangeListener<Duration>() {
                                @Override
                                public void changed(ObservableValue<? extends Duration> ov, Duration t, Duration t1) {
                                    status.setValue(t1.toSeconds());
        Group root = new Group();
        root.getChildren().addAll(btn_play, btn_previous,
                btn_pause, btn_stop, btn_next, btn_load, list,
                status, volume);
        Scene scene = new Scene(root, 800, 450);
        stage.setScene(scene);
        scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
        stage.setTitle("Audio Player");
        stage.show();
    public void disableAll(){
        if(list.getItems().isEmpty()){
        btn_play.setDisable(true);
        btn_pause.setDisable(true);
        btn_next.setDisable(true);
        btn_previous.setDisable(true);
        btn_stop.setDisable(true);
    public static void main(String[] args) {
        launch(args);
}

Similar Messages

  • Streaming audio player problems.

    I would be grateful if someone could help me with the following problems.
    I have developed an audio streaming app that relies on OSMF framework in Android and StageVideo / Netstream classes in iOS (OSMF is HLS agnostic).
    The Android app, works great except when the screen goes dark or when the app is pushed in the background.
    When the screen goes dark, the app takes almost a minute to switch between streams. When testing in AIR simulator and when the device screen is not dark, the app moves to the next track quickly. Why? Is this related to the fact that the framerate slows to 4 per second when device screen is dark?
    If the app is pushed to the background, the audio continues playing, but when the track is complete, the player does not continue to play the next track. If I bring the app to the foreground, it immediately starts playing the next track. Again, I don't understand why this is the case?
    I tried setting the different rendering modes to direct, and cpu. When set to direct, the app stops playing as soon as the screen goes dark. In auto and cpu mode, it continues to play but it does exhibit the problems mentioned above. I did not try the GPU since Adobe is against doing so for Flex applications.
    When testing in iOS, the app keeps the screen lit the whole time. This is by design from me because I have added
    NativeApplication.nativeApplication.systemIdleMode = SystemIdleMode.KEEP_AWAKE;
    to keep the phone screen from going dark. If I allow the screen to go dark, the app stops playing. The audio stops playing if I push the app to the background as well. Of course, keeping the screen lit is not ideal because it unnecessarily drains the battery and is distracting when driving at night. I have seen other apps for example that keep playing audio when the screen dark, so I know that it is possible. Any suggestions on how to keep the audio playing when the screen goes dark or when the app is pushed to the background would be greatly appreciated.

    Just to be clear, using the same sound file Ableton Live will crash but other media players play it back fine? If that's the case, I would contact Ableton support.
    - Peter

  • Audio player problems

    Hello!
    Im developing a game and I have trouble with the sound. All actions regarding sound are treated in a separate thread. But in happens that I get:
    ** Audio receiveEvent: event: 0
    ** Audio receiveEvent: event: 16
    ** Audio receiveEvent: event: 3
    I figured out that event3 means player has stopped. Can you tell me where I could find where I can find what event 0 and event 16 mean?
    Thank You,
    Raul

    forgot to mension, the application freezes when those events appear.

  • I can not get real audio player to record videos from the internet, I believe the problem is that my Firefox browser is set for 64 bi... i need to change it to 32 and do not know how.

    I can not get real audio player to record videos from the internet i use firefox as my browser on windows 7, I believe the problem is that my Firefox browser is set for 64 bi... i need to change it to 32 and do not know how.

    dont know what to do

  • Please help me install this audio player!

    Hello anyone reading this,
    I am very new to designing a website, and decided to venture out and add some audio to it.  I am a piano instructor and am VERY determined to do this.
    I recently purchased some files from this site:
    http://www.flashcomponents.net/component/advanced-mp3-player-with-play list-totally-customizable-xml-driven.html
    That is the same exact one I purchased.
    I recently engaged in a little email session with the author / developer and he was sending me emails that had a lot of technical language of which I couldn't understand.  I needed help, and he didn't seem to pay much attention to my problem, just kept repeating the same thing.
    I eventually was able to research his terminology and I finally got around to being able to comprehend his 'steps' listed for me to get this thing up and running.
    He basically said everything I needed was in a folder titled 'deploy' ... and that I just copy that folder into my Dreamweaver site project , along with my images, root folder, etc.  Ok, easy enough.  I did that.
    His next step was to insert the .swf file into my web page in Dreamweaver.  Ok, easy enough.  Did that.  BUT, there is a problem.  A fairly large grey box shows up with an F inside it.  This is in 'design' view.  In 'Live view', I see nothing at all of the player, just a large grey box with no F inside it.
    The peculiar thing is that there are 3 files inside this 'deploy' folder that when I double click them ... a beautiful audio mp3 player pops up and performs perfectly.  It's the real thing.  Just when I insert the .swf file into my site, nothing at all happens.  And this was what the guy told me to do.
    Since then he stopped corresponding with me.  Not sure why.  Here are the files I have in 'Deploy'.
    playlist.xml
    playerstyles.css
    playersettings_v4.xml
    Mp3player_v4.swf
    index.php
    index.html
    BG.jpg
    AC_RunActiveContent.js
    The 2 index files open up a perfect audio player as shown on the site.  So does the Mp3player_f4.swf.
    I also have a folder called 'scripts' that has 2 scripts listed for the audio player.
    swfobject_modified.js
    expressInstall.swf
    Please oh please, if any of this makes any sense and if what I typed is a symptom of something, please help me.  I am desperate as all the research I've done is getting me nowhere!!!

    Your testing confirms my suspicion that it’s a pathing problem
    “Then I tested out the index.html and the index.php files that are located in 'deploy'
    They didn't work.  no image at all ... nothing. “
    That is working correctly. If you path it to work from the Web page, of course it will not work from “index.html” in the deploy folder… it’s not supposed to. It’s supposed to work from the Web page one folder level up. Did you test it from YOUR Web page after changing the paths?
    “I noticed that as I said the index.html and the index.php didn't work ... but the mp3player_v4.swf STILL worked perfectly fine.  All 3 of those files are under 'deploy'”
    This is also to be expected, because when testing the .swf directly (not on YOUR Web page), the paths in the xml file to the mp3s is correct. But remember, when you place that .swf on YOUR Web page, you are removing the .swf from “deploy” and placing it in the same folder as your Web page….. it’s not in deploy anymore.
    “Also, a peculiar thing happened as well as I was playing around with things. “
    Well for testing you could take everthing out of “deploy” and move it into the same folder as YOUR Web page and just change the path on your web page to the .swf (delete the “deploy/” part). Now every thing is in the root folder, there is no deploy folder, only a “sound” folder which holds the mp3s and the palyer would work just fine, because RELATIVE to the location of the .swf on the WEB PAGE, all the paths are correct.
    But then you don’t really learn how to resolve pathing issues.

  • A few questions about audio player in iBooks Author

    1. How can I set the player to a small icon in Landscape layout? It seems that I have to display the player in the Landscape layout and show a big icon (which can't be resized) in the sidebar of the Portrait layout. Is there a way to customize this?
    2. I notice that the audio player in iBooks Author looks different from that in the actual iBook on iPad?
    In iBooks Author it's silver, which looks pretty nice:
    But in actual iBook on iPad it becomes black:
    Is it possible to customize the look of the player?
    3. Another problem about the player in the actual iBook on iPad: When I have multiple players on the same page, only one of them shows the progress bar and time; others just show a play button:
    If I click the one which only has a play button, the whole player will disappear (and won't play the audio clip). I must click the area (which the player is supposed to be in) again, and the player will show up with the progress bar and time (and other players will only have a play button).
    This is very annoying. Does anyone have the same problem?

    assuming you have a MovieClip mc on stage with the registrationpoint in the center:
    stage.addEventListener(MouseEvent.CLICK, zoomHandler);
    var currentZoom:Number = 1;
    var zoomFactor:Number = 1.1;
    var maxZoom:Number = 2;
    function zoomHandler(e:MouseEvent):void{
        var zoomCenter:Point = new Point(e.stageX, e.stageY);
        var mcCenter:Point = new Point(mc.x, mc.y);
        var _xCorrection:Number = mcCenter.x-zoomCenter.x;
        var _yCorrection:Number = mcCenter.y-zoomCenter.y;
    currentZoom +=zoomFactor-1;
    if(currentZoom<maxZoom){
        mc.scaleX +=zoomFactor-1;
        mc.scaleY +=zoomFactor-1;
        mc.x -=_xCorrection*zoomFactor*.5;
        mc.y -=_yCorrection*zoomFactor*.5;
    else{
    trace("maximal zoom level reached");

  • DVD-Audio player does not detect any DVD-Audio sour

    Hi,
    I am trying to play a DVD-Audio disc on my computer using the DVD-Audio player software that came with my Audigy 2 card, but the software fails to detect my DVD-ROM dri've as a DVD-Audio source.
    I can play audio CDs and DVDs with no problems using the DVD-ROM dri've.
    The OS is WindowsXP Pro with SP and I have the latest patches applied to both driver and DVD-Audio player software.
    I would appreciate any suggestions if someone experienced this anoying problem and solved it.
    Thank a lot!

    DVD Audio encryption security has unfortunately been hacked using the decoders within WinDVD from Intervideo.
    As a result, DVD Audio playback using the WinDVD/Audigy combination has been suspended on "new" versions of the software.
    I am a registered user of WinDVD and upgraded to WinDVD 7 Platinum in June and DVD Audio was working fine.
    I mistakenly downloaded an "upgrade" to WinDVD 7 at the end of July and found all my DVD Audio discs failed to play.
    Intervideo (as usual) refused to respond to my technical support queries when I enquired as to whether the DVD audio support was removed in view of the breach of the DVDA encryption.
    Thankfully the previous version was still available for download (after much searching on the web) - WinDVD.Platinum.7.0.Release.2.Build 27.07Using a new activation key from the Intervideo website STILL didn't enable DVDA playback on this previous version however.......... I was able to fudge this using the original purchase activation key by changing the PC system date to within 0 days of my initial activation key supply which I had stored in an email.Hey presto - back to WinDVD DVDA support!Intervideo are being very crafty.... they have updated the WinDVD website to remove all references to DVD Audio support and then were answering my technical support queries as if I wasn't configuring my PC correctly.
    What versions of DVD Audio playback software are you using?
    Creative DVDAudio player? WinDVD (version?)

  • Audio player with some extra's - can't get player realized

    I try to build an audio player with some extra's like looping between 2 time marks.
    Till now i have an interface that can play back audio files but after that the problems start.
    There is no way i can add functions without creating a {color:#ff0000}NotRealizedError{color}.
    According to the documentation the start() method should realize (etc) the player, but it doesn't in my program and neighter does the method player.realize();.
    Can someone give me a hint to get me on the road again.
    Thanks in advance.
    Here is the complete code which generates the NotRealizedError on the dp.setRate(); method:
    (most of it is older source from a basic player on the internet).
    package dictaplayer;
    import java.awt.*;*
    *import java.awt.event.*;
    import java.io.*;*
    *import java.net.MalformedURLException;*
    *import java.net.URI;*
    *import java.net.URL;*
    *import javax.swing.*;
    import javax.media.*;
    public class DictaPlayer extends JFrame {
    private Player dp;
    private URI uri;
    private URL url;
    private boolean realized = false;
    public DictaPlayer()
    super( "Testing DictaPlayer" );
    JButton openFile = new JButton( "Open file to play" );
    openFile.addActionListener(
    new ActionListener() {
    public void actionPerformed( ActionEvent e ) {
    openFile();
    createPlayer();
    getContentPane().add( openFile, BorderLayout.NORTH );
    setSize( 300, 300 );
    setVisible(true);
    private void openFile()
    File file = null;
    JFileChooser fileChooser = new JFileChooser();
    fileChooser.setFileSelectionMode(
    JFileChooser.FILES_ONLY );
    int result = fileChooser.showOpenDialog( this );
    // user clicked Cancel button on dialog
    if ( result != JFileChooser.CANCEL_OPTION )
    file = fileChooser.getSelectedFile();
    try {
    uri = file.toURI();
    } catch (SecurityException e) {
    e.printStackTrace();
    // Convert the absolute URI to a URL object
    try {
    url = uri.toURL();
    } catch (IllegalArgumentException e) {
    e.printStackTrace();
    } catch (MalformedURLException e) {
    e.printStackTrace();
    private void createPlayer()
    if ( url == null )
    return;
    removePreviousPlayer();
    try {
    // create a new player and add listener
    dp = Manager.createPlayer( url );
    // blockingRealize();
    dp.addControllerListener( new EventHandler() );
    dp.start(); // start player
    dp.setRate(2);
    catch ( Exception e ){
    JOptionPane.showMessageDialog( this,
    "Invalid file or location", "Error loading file",
    JOptionPane.ERROR_MESSAGE );
    private void removePreviousPlayer()
    if ( dp == null )
    return;
    dp.close();
    Component visual = dp.getVisualComponent();
    Component control = dp.getControlPanelComponent();
    Container c = getContentPane();
    if ( visual != null )
    c.remove( visual );
    if ( control != null )
    c.remove( control );
    private synchronized void blockingRealize() {
    int teller = 1;
    dp.realize();
    while (!realized && teller <= 20) {
    try {
    wait(1000);
    System.out.println("not realized " +teller);+
    +teller++;
    } catch (java.lang.InterruptedException e) {
    System.exit(1);
    public static void main(String args[])
    DictaPlayer app = new DictaPlayer();
    app.addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e )
    System.exit(0);
    // inner class to handler events from media player
    private class EventHandler implements ControllerListener {
    public void controllerUpdate( ControllerEvent e ) {
    if ( e instanceof RealizeCompleteEvent ) {
    Container c = getContentPane();
    // load Visual and Control components if they exist
    Component visualComponent =
    dp.getVisualComponent();
    if ( visualComponent != null )
    c.add( visualComponent, BorderLayout.CENTER );
    Component controlsComponent =
    dp.getControlPanelComponent();
    if (!realized) {
    System.out.println("not realized.");
    if ( controlsComponent != null )
    c.add( controlsComponent, BorderLayout.SOUTH );
    c.doLayout();
    }

    captfoss,
    Thank you for your comment.
    captfoss wrote:
    Start does realize the player, automatically, before it starts it... if it isn't realizing then it also isn't starting.Right, I thought so, but my test was wrong. I now tested it with getState() and I can see it's going from unrealized to realized.
    First off, you can only call setRate on a player that is realized but not started... further, any of the calls like configure, realize, start, stop, etc... are non-blocking calls...so you have to wait for them to finish before you go on to the next step.So you say that when the rate is changed (f.i. by a user in a gui) the program first has to bring player in non-started realized mode (stop + realize), call the setRate() and start the player again (on the exact position it was stopped)?
    The easiest solution would be to use Manager.createRealizedPlayer rather than Manager.createPlayer...Didn't find out yet why, but when i change this (only this), there is no playing.
    Also, ++teller++ is about the most-confused looking code I've ever seen...Just like all the asterisks, i now know that code changes when i toggle between the tabs (rich/plain/preview) in the message box.
    Beyond that, your "blocking realize" function doesn't appear to do anything except suggest you have no business coding anything this advanced. Your boolean value "realize" isn't ever changed, so, I'm not entirely sure what the point of that function is other than to wait 10 seconds.I got this somewhere from the internet. Thought it could help me realize the player, but it didn't (obvious) so i commented it out.
    Slowly I begin to understand the basics of JMF (at least i think so), but I also understand that there are other (Java) ways to build the application I need. Unfortunatly I have to little (hardly any) knowledge of all those (sound) API's (f.i. JLayer) to find my way through them and to decide which is the best for my use (user controled audio playback (at least WAV and MP3) with looping possiblities between 2 marked positions).
    If someone could give me an advise which API (method or whatever you call it) is best to focus on I shurely would appriciate that.

  • In Firefox 4, I open an audio player (CBC Radio2), minimize it and then close the browser screen while listening. Later, when I reopen the browser, it goes to the last screen viewed instead of to the Home Page I set in "Options."

    Firefox 3 did not do this. It started right after I downloaded Firefox 4. The problem does not seem to occur when the audio player is not running. (I use Windows XP)

    You can check in the Windows Task Manager (Processes tab) if the Firefox program and the plugin-container process are closed properly and make sure that there aren't any hanging processes.

  • Mp3 Files in HTML5 Audio player are working fine in Windows browsers but not playing song in Linux browsers. Please help

    I have build an Audio player with HTML5 and jquery. Its working fine in firefox browser in windows OS.
    But when i run that code on Linux OS browser. It doesn't play the song. Is this a bug or there is problem in my code ? Please help

    On Linux you need proper GStreamer support to play mp3 files with the HTML5 media player.
    *media.gstreamer.enabled = true
    *Bug 794282 - Enable GStreamer in official builds

  • Suggestions for new audio player for

    Hi all.
    I am now in the market for a new digital audio player. I had a Creative Zen Micro, that succumbed to the infamous headphone jack. Now, due to Walmart's almighty warranty service program, I have a check for $250.
    I have been looking at the Vision M and the Micro Photo, but am unsure of which I would like. I'm inclined toward the Vision, because of the video capability and the 30 gig dri've. But I have a feeling the Micro Photo will be perfect for me.
    Does anyone have any advice besides search the forums and do my own research? I am already doing that, and still not sure. Also, have there been any major problems that are affecting these players?
    Any other digital audio player recommendations will be welcome also. Anything with greater than or equal to a 5 gigabyte capacity, and plays audio well.
    Thanks much!
    Andy
    Also, if this might matter - I have a spare battery from my old Zen Micro, and I have all the accessories (cable, power cord, etc). Would that mean I should be more inclined to the ZMP?Message Edited by moparhemifan on 0-3-2006 03:50 AM

    moparhemifan wroteoes anyone have any advice besides search the forums and do my own research? I am already doing that, and still not sure. Also, have there been any major problems that are affecting these players?
    Really it comes down to features. If 8Gb isn't enough space, the decision is made for you. If you want video support, decision is made for you
    Both players are relati'vely new, and the problems affecting both won't have come to the fore yet (if there are any). The big let down with the Micro Photo for some has been the inability to play music and look at photos, and no album art. The Vision:M though has both of these functions. I know what player I would buy!

  • Audio player strange behaviour

    I have a problem with the audio player of iBooks Author: when I arrive to the page that contains the audio file, the player looks for a moment like the one of Real Player (grey, with some controls). Then, it becames black, with only the play botton (grey). Is this a standard behaviour? Can it be fixed?!?
    Thanks so much!
    Pier83

    and i have the same problem
    качественные недорогие грузоперевозки Одесса украина

  • Audio player not give an option on the Adobe Flash Media Live Encoder

    Audio player not give an option on the Adobe Flash Media Live Encoder:  How do I resolve this problem?

    Please ask your question on Adobe Media Encoder forum: http://forums.adobe.com/community/ame
    This forum is for Adobe Reader.
    ~Deepak

  • Custom audio player in Edge?

    Hi.
    I'd like to create a custom audio player in Edge. I need the code for the following elements:
    play/pause - play/pause toggle button (mouseover hides the play and reveals the pause and vice-versa)
    timeline - timeline track
    loading/buffering bar - loading/buffering progress bar
    handle - playhead: indicates current position in the audio file and  acts as a drag handle to move to a different point of the audio
    timeleft - remaining play time (in minutes and seconds)
    The buttons are symbols, because they all have mouseover/mouseout animations beside the click.
    Here´s a schematic of what I want:
    Help?

    I found this tutorial by Neutron Creations (all credits to them) that seems to meet the requirements for my custom audio player.
    The problem is that, not being a Javascript/jQuery savy, I'm having quite a bit of difficulty in adapting the code to Edge's context.
    Could you please lend a help?

  • How to make simple flash audio player?

    I have some mp3 files in Quicktime format that I would like to put on a webpage. Each file, when clicked, come up in a separate page and play.
    My question: how can I modify these page with mp3 file so I can add some explanatory text to the page? Right now the site visitor just clicks on the link, a new page comes up and plays the file. But I can't modify what comes up. Nor can I even see Page Source.
    If there is a better way to implement my audio files to visitors can play the file and see the explanatory text at the same time, I would appreciate your suggestions.
    The specific page which contains the links is:  http://www.englishjapaneseonlinedictionary.com/dictionary_my_Japanese_teacher.ht m
    If you click on any of the files you will see the problem--I can't modify the page which comes up and plays the audio file
    Someone suggested I make a flash audio player to embed in a page. I know nothing about Flash. Can anyone direct me to some resources where I could make a flash player to play my files and that would allow me to add some other textual content to a webpage?
    Many thanks in advance,
    Jane

    The flash add-on is not available for Safari on iOS. Never has been and in fact Adobe has ceased support for flash for mobile devices in general. Your options, depending on the specific sites:
    See if the site or sites in question have their own apps availabel in teh app store
    Look into some browsers such as Puffin adn iSwifter (there are others, I beleive). These browsers use a third server site to translate the flsh content into a form that the iPAd can use and restreams them to you. They may not work with all content.
    Use a computer capable of running flash.
    Seek a source of the conent that is designed for non flash use.

Maybe you are looking for

  • DVD/CD drive read/writes DVD, reads CD, but suddenly fails to recognize CDr

    I'm having a problem that I just don't understand, and I can't seem to find any information on, so I'm hoping somebody out there has some thoughts. I have a powerbook 17 with the DVD/CD listed below (from system profiler). This drive has always worke

  • 3 flashes and no bootup

    Randomly my Macbook Pro will flash at me 3 times over and over again. When i turn it off and turn it back on, it will boot properly. It does this all the time when i first start it up. What is causing this?

  • Cell Styles with a script

    Is there anyway to style table cells with a script, I can't fine any answers, all I'm after is to add a one cell style to the header row, then a different cell style to the rest of the table? is it even possible, any pointer would be great? Many than

  • No audio to menu page

    The first page created in iDVD is the main menu page. I have dropped audio taken from iTunes via the media tab, into the 'drop zone' as required yet hear nothing. As I progress to the movie or slideshow, the audio I placed there plays. My iDVD versio

  • Print Verizon Contacts

    Using an iPhone 5s, Contacts are on Verizon server: Able to locate my contacts with myVerizon web site but cannot print a listing, Print dialogue box never appears. Used Safari, Chrome, and Foxfire, same error message: problem start again. Looked at