title: Playing Video in Java FX using vlcj api
body: <p>I am trying to play a video on Java FX components but not able to play.
  I know how to play a video in swing using vlcj but when I am trying the same I am not able to do so in javafx</p>
  
  <pre><code>    @Override
      public void start(Stage primaryStage) 
      {
          File f = new File("Video.mp4");
          new NativeDiscovery().discover();
          EmbeddedMediaPlayerComponent playerComponent = new EmbeddedMediaPlayerComponent();
          /*I dont know where to add the playerComponent as we do in swing*/
          MediaPlayer mp=playerComponent.getMediaPlayer();       
          StackPane root = new StackPane();
          Scene scene = new Scene(root, 700, 700);        
          primaryStage.setTitle("Hello World!");
          primaryStage.setScene(scene);
          primaryStage.show();
      }
       //above code is for javafx where I am getting a problem
       //below code for swing
       public void playVideo()
       {
          new NativeDiscovery().discover();
          EmbeddedMediaPlayerComponent playerComponent = new EmbeddedMediaPlayerComponent();
          jif[i].setContentPane(playerComponent);
          MediaPlayer p = playerComponent.getMediaPlayer();
          ft = new FileTest();
          videoList = ft.getVideoList();
          jif[i].setVisible(true);
          frame.setVisible(true);
          p.setAspectRatio(width[i] + ":" + height[i]);
          p.playMedia(videoList[0]);
      }
  </code></pre>
  
  <p>I want to know what I need to do in javafx for settingContentPane we do in swing.</p>