Choose size, rate and what follows when recording the editor
The editor recording had fixed settings: the canvas size at 60 fps,
always converted and imported. Recording in 4K needs a choice, and the
server shrank every video to 1080p anyway. Start recording... now opens
a dialog, and a recording always goes to the server as it is.
- The dialog holds name, resolution (Screen, 1080p, 1440p, 4K), fps
(60 or 30), mouse pointer, sound, Convert and Import after
conversion. Import is greyed out while Convert is off. The browser
keeps the last choice, not the name.
- A larger resolution makes the editor draw finer while it records,
so 4K is sharp, not stretched. It is never below the screen's own
resolution and goes back after Stop.
- Stop always uploads. Without Convert the file only stays on the
server. Without Import it is converted but no asset is added. Both
are found in the video picker.
- The server keeps the original next to each MP4 for every upload, so
Download in the video tab and the picker gives the original. Videos
from before have none, they still download their MP4.
- A file left unconverted shows in the picker as not converted, with
a Convert button. POST videos/{file}/convert queues it, and upload
takes convert=0.
- The worker now caps a video at 3840x2160 instead of 1920x1080. Videos
converted before stay as they are.
Tests:
- PHP videos.test.php: 81 checks green, with the original, convert=0,
a later Convert and the 4K cap.
- Unit recording: 5 new, green. Red without the rule that a recording
is never below the screen's resolution.
- e2e 67e-ii: the video tab downloads the .source.mkv, a Matroska
file. 67f: 1440p from a 1280x800 window gives 2304x1440 at 30 fps
without sound, kept and not imported, then converted in the picker.
Both red with the MP4 download and without the finer drawing.
- The README names 2045 e2e checks.
- Gate on melektaus-atx: 304 files, 4699 tests green.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
93190e185c
commit
ba01d146e9
26 files changed
+1011
-129
No files matched your search
+22
-3
@@ -79,6 +79,8 @@ import { Toolbar } from './panels/Toolbar';
|
||||
import { type PlayHost, PlaySession, type WorldSnapshot } from './PlaySession';
|
||||
import { type RecordingUpload, RecordingUploads } from './recordingUploads';
|
||||
import { EditorRecorder } from './EditorRecorder';
|
||||
import { EditorRecordingDialog } from './EditorRecordingDialog';
|
||||
import { editorRecordingSettings, keepEditorRecordingSettings } from './editorRecordingSettings';
|
||||
import type { MadeRecording } from '../viewport/RecordingTake';
|
||||
import { ProjectSession } from './ProjectSession';
|
||||
import { ParticlesEditor } from './particles/ParticlesEditor';
|
||||
@@ -351,6 +353,7 @@ export class Editor implements PlayHost {
|
||||
private readonly toolbar: Toolbar;
|
||||
private readonly passwordDialog = dialogSlot<PasswordDialog>();
|
||||
private readonly generalDialog = dialogSlot<GeneralSettingsDialog>();
|
||||
private readonly recordingDialog = dialogSlot<EditorRecordingDialog>();
|
||||
/** Drawn-frame count at the last measurement, not a counter of its own. */
|
||||
private fpsFrames = 0;
|
||||
private fpsElapsed = 0;
|
||||
@@ -391,7 +394,7 @@ export class Editor implements PlayHost {
|
||||
this.particlesEditor = new ParticlesEditor(state);
|
||||
this.streamKeeper = new StreamKeeper(state, sounds);
|
||||
this.soundEditor = new SoundEditor(state, this.streamKeeper);
|
||||
this.videoEditor = new VideoEditor(state);
|
||||
this.videoEditor = new VideoEditor(state, videos);
|
||||
this.soundFxEditor = new SoundFxEditor(state);
|
||||
this.instrumentEditor = new InstrumentEditor(state);
|
||||
this.patternEditor = new PatternEditor(state, sounds);
|
||||
@@ -421,7 +424,7 @@ export class Editor implements PlayHost {
|
||||
state.setNotice(line);
|
||||
console.warn('[recording]', line);
|
||||
},
|
||||
saved: (recording) => this.recordings.add(recording),
|
||||
saved: (recording, options) => this.recordings.add(recording, options),
|
||||
showBadge: (on) => this.toolbar.showRecording(on),
|
||||
badgeRoom: () => this.toolbar.recordingRoom(),
|
||||
});
|
||||
@@ -815,7 +818,7 @@ export class Editor implements PlayHost {
|
||||
{ separator: true },
|
||||
recorder.isRecording
|
||||
? { label: 'Stop recording', onSelect: () => recorder.stop() }
|
||||
: { label: 'Start recording', onSelect: () => recorder.start() },
|
||||
: { label: 'Start recording…', onSelect: () => this.openEditorRecording() },
|
||||
{ separator: true },
|
||||
{ label: 'General settings…', onSelect: () => this.openGeneralSettings() },
|
||||
...(this.usersPane ? [{ label: 'User management', onSelect: open }] : []),
|
||||
@@ -833,6 +836,21 @@ export class Editor implements PlayHost {
|
||||
return this.generalDialog.current();
|
||||
}
|
||||
|
||||
/** "Start recording…": how the editor is recorded, starting on the last choice made in this browser. */
|
||||
openEditorRecording(): EditorRecordingDialog {
|
||||
return this.recordingDialog.open(
|
||||
new EditorRecordingDialog(editorRecordingSettings(), (settings) => {
|
||||
keepEditorRecordingSettings(settings);
|
||||
this.editorRecorder.start(settings);
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
/** The open "Start recording" dialog, for the check scripts. */
|
||||
editorRecordingDialog(): EditorRecordingDialog | null {
|
||||
return this.recordingDialog.current();
|
||||
}
|
||||
|
||||
/**
|
||||
* The account menu under its button (#182). The name stands in it as an entry that cannot be
|
||||
* picked: it says who is signed in without costing the crowded toolbar another label.
|
||||
@@ -1350,6 +1368,7 @@ export class Editor implements PlayHost {
|
||||
// Closed rather than just thrown away with the overlay below, so the slot lets go of it too.
|
||||
this.passwordDialog.current()?.close();
|
||||
this.generalDialog.current()?.close();
|
||||
this.recordingDialog.current()?.close();
|
||||
// The tooltip is not the editor's to destroy: it leaves the overlay before that is emptied.
|
||||
tooltips.dismiss();
|
||||
// A menu or a picker left open belongs to widgets that are about to be destroyed.
|
||||
|
||||
Reference in new issue
Block a user