JavaFX Play a video backwards

Viewed 340

I'm trying to loop a video with the JavaFX MediaPlayer but instead of looping to the start, I want to play it backwards, I didn't find anything on the javadoc, is anyone aware how to do it?

public class Test extends Application {

    public static void main(String[] args) {
        Application.launch(Test.class);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        MediaView mediaView = new MediaView();

        Media media = new Media("http://clips.vorwaerts-gmbh.de/VfE_html5.mp4");

        MediaPlayer mediaPlayer = new MediaPlayer(media);
        mediaPlayer.setVolume(0.1); // for the glory of the headphones
        mediaPlayer.play();

        mediaView.setMediaPlayer(mediaPlayer);

        BorderPane borderPane = new BorderPane();
        borderPane.setCenter(mediaView);

        Scene scene = new Scene(borderPane);
        primaryStage.setScene(scene);

        primaryStage.setWidth(800);
        primaryStage.setHeight(600);
        primaryStage.centerOnScreen();

        primaryStage.show();
    }

}
0 Answers
Related