user3104589
user3104589

Reputation: 137

Does JavaFX support RTSP streaming?

This is my code:

Media media = new Media("rtsp://192.168.1.206:554");
final MediaPlayer player = new MediaPlayer(media);
MediaView view = new MediaView(player);
Group root = new Group();
root.getChildren().add(view);
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 300, 275));
primaryStage.show();
player.play();

But there's an exception.

Upvotes: 4

Views: 2591

Answers (1)

ItachiUchiha
ItachiUchiha

Reputation: 36792

rtsp is not supported till date. The supported protocols are :

  • FILE
  • HTTP
  • JAR
  • HLS

For more information go through Media official documentation.

Upvotes: 2

Related Questions