title: Play a Youtube video using JavaFX
body: <p>I'm trying to play a video from youtube using javaFX. Here is my code</p>
  
  <pre><code>public class Main extends Application {
  
  public static void main(String[] args) {
      launch(args);
  }
  
  @Override
  public void start(Stage primaryStage) throws Exception {
      primaryStage.setTitle("Media");
      Group root = new Group();
      Media media = new Media("http://www.youtube.com/watch?v=k0BWlvnBmIE");
      MediaPlayer mediaPlayer = new MediaPlayer(media);
      mediaPlayer.play();
  
      MediaView mediaView = new MediaView(mediaPlayer);
  
      root.getChildren().add(mediaView);
      Scene scene = SceneBuilder.create().width(500).height(500).root(root)
              .fill(Color.WHITE).build();
      primaryStage.setScene(scene);
      primaryStage.show();
  }
  
  }
  </code></pre>
  
  <p>The window opens but video doesn't play and there is no exception. What is the problem and how can i fix it.</p>
  
  <p>Thanks.</p>