void initialize() {
assert controlButton != null : "fx:id=\"controlButton\" was not injected: check your FXML file 'MediaControl.fxml'.";
assert timeSlider != null : "fx:id=\"timeSlider\" was not injected: check your FXML file 'MediaControl.fxml'.";
assert volumeSlider != null : "fx:id=\"volumeSlider\" was not injected: check your FXML file 'MediaControl.fxml'.";
mp.errorProperty().addListener((Observable observable) -> {
final MediaException ex = mp.getError();
if (ex != null) {
Platform.runLater(() -> {
Logger.getLogger(VideoFile.class.getName()).log(Level.WARNING, ex.getType() + " Failed to initialize MediaControl for file " + file.getName(), ex);
setCenter(new Text(ex.getType() + "\nSee the logs for details."));
setBottom(null);
});
}
});
mp.statusProperty().addListener((observableStatus, oldStatus, newStatus) -> {