caprica / vlcj-javafx-demo

Sample application showing vlcj rendering video in a JavaFX scene.
113 stars 46 forks source link

Lag when resize video #13

Closed seravifer closed 5 years ago

seravifer commented 7 years ago

When you resize the window, the video takes a long time to resize, with a lot of lag. Is there any way that it will not appreciate or function properly?

seravifer commented 7 years ago

I fixed it by changing the fitImageViewSize method by this:

imageView.fitWidthProperty().bind(playerHolderID.widthProperty());
imageView.fitHeightProperty().bind(playerHolderID.heightProperty());
imageView.setPreserveRatio(true);

Now the only problem is that it is not focused. Solution, convert playerHolderID to an HBox and center it. It is now much smoother resizing but you can see a small lag.

caprica commented 5 years ago

I appreciate this response is very late, but thanks for the tip.

In any case, resize needs to be reworked as per #16.