diff --git a/src/main/java/com/zhangmeng/tools/controller/PlayerController.java b/src/main/java/com/zhangmeng/tools/controller/PlayerController.java index daee793..40fb67e 100644 --- a/src/main/java/com/zhangmeng/tools/controller/PlayerController.java +++ b/src/main/java/com/zhangmeng/tools/controller/PlayerController.java @@ -51,6 +51,8 @@ public class PlayerController { @FXML private SplitPane splitPane; + private MediaView view; + public static final String color_cell = "#f4f4f4"; @FXML @@ -213,6 +215,9 @@ public class PlayerController { log.info("player:--->height:{}", height); } }); + view = (MediaView)root.lookup("#mv"); + view.fitHeightProperty().bind(root.heightProperty()); + view.fitWidthProperty().bind(root.widthProperty()); this.width.addListener((observable, oldValue, newValue) -> { PlayerController.this.root.setPrefWidth(newValue.doubleValue() - listView.getWidth());