forked from j62/ctbrec
Make live previews experimental
Add a setting to toggle live previews. When switched off, the thumbnails won't show the trigger and the recording table won't show the column. I did this, because the MediaPlayer sometimes bugs out. It then opens a lot of connections and further tries to open a stream end in an exception in the playlist parser.
This commit is contained in:
parent
47d8101ce8
commit
e362980028
|
@ -118,6 +118,9 @@ public class RecordedModelsTab extends Tab implements TabSelectionListener {
|
|||
preview.setCellValueFactory(cdf -> new SimpleStringProperty(" ▶ "));
|
||||
preview.setEditable(false);
|
||||
preview.setId("preview");
|
||||
if(!Config.getInstance().getSettings().livePreviews) {
|
||||
preview.setVisible(false);
|
||||
}
|
||||
TableColumn<JavaFxModel, String> name = new TableColumn<>("Model");
|
||||
name.setPrefWidth(200);
|
||||
name.setCellValueFactory(new PropertyValueFactory<JavaFxModel, String>("displayName"));
|
||||
|
|
|
@ -174,7 +174,7 @@ public class ThumbCell extends StackPane {
|
|||
StackPane.setAlignment(pausedIndicator, Pos.TOP_LEFT);
|
||||
getChildren().add(pausedIndicator);
|
||||
|
||||
if(Config.getInstance().getSettings().previewInThumbnails) {
|
||||
if(Config.getInstance().getSettings().livePreviews) {
|
||||
getChildren().add(createPreviewTrigger());
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
|||
private CheckBox chooseStreamQuality = new CheckBox();
|
||||
private CheckBox multiplePlayers = new CheckBox();
|
||||
private CheckBox updateThumbnails = new CheckBox();
|
||||
private CheckBox previewInThumbnails = new CheckBox();
|
||||
private CheckBox livePreviews = new CheckBox();
|
||||
private CheckBox showPlayerStarting = new CheckBox();
|
||||
private RadioButton recordLocal;
|
||||
private RadioButton recordRemote;
|
||||
|
@ -462,16 +462,17 @@ public class SettingsTab extends Tab implements TabSelectionListener {
|
|||
GridPane.setMargin(updateThumbnails, new Insets(CHECKBOX_MARGIN, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(updateThumbnails, 1, row++);
|
||||
|
||||
l = new Label("Preview in thumbnails");
|
||||
l = new Label("Enable live previews (experimental)");
|
||||
layout.add(l, 0, row);
|
||||
previewInThumbnails.setSelected(Config.getInstance().getSettings().previewInThumbnails);
|
||||
previewInThumbnails.setOnAction((e) -> {
|
||||
Config.getInstance().getSettings().previewInThumbnails = previewInThumbnails.isSelected();
|
||||
livePreviews.setSelected(Config.getInstance().getSettings().livePreviews);
|
||||
livePreviews.setOnAction((e) -> {
|
||||
Config.getInstance().getSettings().livePreviews = livePreviews.isSelected();
|
||||
saveConfig();
|
||||
showRestartRequired();
|
||||
});
|
||||
GridPane.setMargin(l, new Insets(3, 0, 0, 0));
|
||||
GridPane.setMargin(previewInThumbnails, new Insets(CHECKBOX_MARGIN, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(previewInThumbnails, 1, row++);
|
||||
GridPane.setMargin(livePreviews, new Insets(CHECKBOX_MARGIN, 0, 0, CHECKBOX_MARGIN));
|
||||
layout.add(livePreviews, 1, row++);
|
||||
|
||||
l = new Label("Start Tab");
|
||||
layout.add(l, 0, row);
|
||||
|
|
|
@ -69,7 +69,7 @@ public class Settings {
|
|||
public List<Model> models = new ArrayList<>();
|
||||
public List<EventHandlerConfiguration> eventHandlers = new ArrayList<>();
|
||||
public boolean determineResolution = false;
|
||||
public boolean previewInThumbnails = true;
|
||||
public boolean livePreviews = false;
|
||||
public boolean requireAuthentication = false;
|
||||
public boolean chooseStreamQuality = false;
|
||||
public int maximumResolution = 0;
|
||||
|
|
Loading…
Reference in New Issue