This discussion is archived
1 Reply Latest reply: Mar 8, 2013 8:56 AM by Marcello RSS

MediaPlayer not playing video -- no errors and no exceptions

Marcello Newbie
Currently Being Moderated
The situation is: on my application almost all movies are playing correctly. In some environment the movie is not playing, the screen keeps black BUT I do not get any errors or exceptions


All works fine on Win7, winXP
However when I deploy my app on "Windows7 embedded", then one of my movies is not getting played. Can this be because of missing codecs or memory issues or JDK version?
Nevertheless there should be at least some error or exception !?
How can I figure out whether a movie is getting played or not (and if not where can I fing the reason?)

Please advise, thanks

Below is th code that I am using:
final Media media = new Media(      url          );
          media.setOnError( new Runnable(){     
                         @Override
                         public void run() {
                              player.stop();     
                                                System.out.println("error 1");                         
                         }                         
                    });
                    
                    if (media.getError() != null){
                         System.out.println( "EventshowingNode.show( media.getError..)", media.getError());
                         return;
                    }                    
                    if ( player != null)
                         player.stop();
                                        
                    player = new MediaPlayer(     media);
                    player.setMute( true);
                    player.setAutoPlay( false);
                    mediaView.setMediaPlayer( player);
                    
                    double w= media.getWidth();
                    double h= media.getHeight();
                    player.setOnError( new Runnable(){

                         @Override
                         public void run() {
                              player.stop();                              
                                                System.out.println("error 2");
                              //handler.onFinishedEvent();
                         }
                         
                    });
                    
                  player.play();
                  player.setOnEndOfMedia( new Runnable() {
                         
                         @Override
                         public void run() {
                              ;//
                              
                         }
                    });
Edited by: Marcello on 06.03.2013 02:23