forked from j62/ctbrec
1
0
Fork 0

Allow streaming of running recordings

Since the playlist is now written on-the-fly, we can stream the recording while it is still running
This commit is contained in:
0xb00bface 2021-10-01 19:57:21 +02:00
parent 1f50b74728
commit 2775303113
1 changed files with 6 additions and 5 deletions

View File

@ -413,13 +413,14 @@ public class RecordingsTab extends Tab implements TabSelectionListener, Shutdown
JavaFxRecording first = recordings.get(0);
var openInPlayer = new MenuItem("Open in Player");
openInPlayer.setOnAction(e -> play(first));
if (first.getStatus() == FINISHED || Config.getInstance().getSettings().localRecording) {
contextMenu.getItems().add(openInPlayer);
} else if (first.getStatus() == RECORDING && !Config.getInstance().getSettings().localRecording) {
openInPlayer.setText("Open live stream");
openInPlayer.setOnAction(e -> play(first.getModel()));
if (first.getStatus() == RECORDING || first.getStatus() == FINISHED) {
contextMenu.getItems().add(openInPlayer);
}
if (first.getStatus() == RECORDING) {
var openLiveStream = new MenuItem("Open live stream");
openLiveStream.setOnAction(e -> play(first.getModel()));
contextMenu.getItems().add(openLiveStream);
}
var openContactSheet = new MenuItem("Open contact sheet");
openContactSheet.setOnAction(e -> openContactSheet(first));