Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8117387

MediaPlayer not able to play media files which are stored at URL [web location]

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 7u7
    • javafx
    • OS: Windows 7 [64bit]
      JDK/JRE: jdk1.7.0_09

      We, at FORMS team, trying to use JavaFX to implement Audio capability in FORMS Client side. Issue what I am facing is while trying to use a media file, which is stored at a web location [URL]. Same code works with no issues if i select a local file as source (comment line 7 and un-comment line 6).

      Let me know if you need some more information on the issue

      Following is the code i am using.
      1 public class Class1 {
      2 private static MediaPlayer player = null;
      3 public static void main(String[] args) {
      4 try{
      5 JFXPanel jPanel = new JFXPanel();
      6 //String myURL = new File("file1.mp3").toURI().toString();
      7 String myURL = new String("http://slc04cep.us.oracle.com:9001/forms/java/file1.mp3");
      8 Media media = new Media(myURL);
      9 player = new MediaPlayer(media);
      10 player.setAutoPlay(true);
      11 player.play();
      12 }
      13 catch(Exception ex){
      14 ex.printStackTrace();
      15 }
      16 }
      17 }

            stayer Kirill Kirichenko (Inactive)
            ndubey Nitin Dubey (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: