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 }
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 }