diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd43dcf..8d06fbd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Web API (`/api/v1`) - This allows you to make your own apps, pages and overlays on the same JRTI feeds as the default proposed interface, with an optional control key for other devices if need be. Pages from other websites can no longer change anything, as a security measure. See the API page of the docs for more information
- Your own pages and styles (`PluginData/Apps/`, `PluginData/Web/`) - you can now make your own pages and styles, kept across updates
+- Save recordings to this device (Settings, Finished recordings) - the web UI downloads each recording when it stops, so recordings land on the computer watching the feeds as well as the KSP one. On by default on every device except the KSP computer
## v3.3.0 - 2026-11-11
diff --git a/GameData/JustReadTheInstructions/Web/index.html b/GameData/JustReadTheInstructions/Web/index.html
index e324e77..2ee4829 100644
--- a/GameData/JustReadTheInstructions/Web/index.html
+++ b/GameData/JustReadTheInstructions/Web/index.html
@@ -71,6 +71,13 @@
Recorder settings
+
+
+
+
Each recording is still made in the game. Once it stops, this page downloads it here, so keep it open. Only recordings that finish while it is open are downloaded. On by default on every device except the KSP computer.
+
On a phone or tablet, each recording can be several GB and is downloaded over your Wi-Fi or mobile data.
+
+
The game cannot record right now. JRTI's settings window in KSP (Ctrl+Alt+F8) says why.
diff --git a/GameData/JustReadTheInstructions/Web/js/main.js b/GameData/JustReadTheInstructions/Web/js/main.js
index a5b0074..dbd07a4 100644
--- a/GameData/JustReadTheInstructions/Web/js/main.js
+++ b/GameData/JustReadTheInstructions/Web/js/main.js
@@ -3,6 +3,7 @@ import { fetchCameras } from './api.js';
import { CameraCard } from './camera-card.js';
import { mountSettingsUI } from './settings-ui.js';
import { mountRecordingsUI } from './recordings-ui.js';
+import { syncRecordingsAutoSave } from './recordings-autosave.js';
import { enableDragOrder } from './drag-order.js';
import { RecordingGroups } from './recording-groups.js';
import { setInGameRecordingAvailable } from './recorder-settings.js';
@@ -185,6 +186,7 @@ function trackStatusLineHeight() {
async function main() {
mountSettingsUI();
mountRecordingsUI();
+ syncRecordingsAutoSave();
groups.mount(document.getElementById('groups-bar'));
trackStatusLineHeight();
await applySession();
diff --git a/GameData/JustReadTheInstructions/Web/js/recorder-settings.js b/GameData/JustReadTheInstructions/Web/js/recorder-settings.js
index 3ee323e..ad92559 100644
--- a/GameData/JustReadTheInstructions/Web/js/recorder-settings.js
+++ b/GameData/JustReadTheInstructions/Web/js/recorder-settings.js
@@ -2,8 +2,13 @@ import { VIDEO_CODECS } from './config.js';
const STORAGE_KEY = 'jrti.recorder.settings.v1';
+const HOST_NAMES = ['localhost', '127.0.0.1', '[::1]'];
+
+export const IS_HANDHELD = window.matchMedia('(pointer: coarse)').matches;
+
const DEFAULTS = Object.freeze({
codec: VIDEO_CODECS.H264,
+ saveToDevice: !HOST_NAMES.includes(location.hostname),
});
function isValidCodec(value) {
@@ -15,7 +20,10 @@ function load() {
const raw = localStorage.getItem(STORAGE_KEY);
if (!raw) return { ...DEFAULTS };
const parsed = JSON.parse(raw);
- return { codec: isValidCodec(parsed.codec) ? parsed.codec : DEFAULTS.codec };
+ return {
+ codec: isValidCodec(parsed.codec) ? parsed.codec : DEFAULTS.codec,
+ saveToDevice: typeof parsed.saveToDevice === 'boolean' ? parsed.saveToDevice : DEFAULTS.saveToDevice,
+ };
} catch {
return { ...DEFAULTS };
}
@@ -50,6 +58,10 @@ export function selectedGameCodec() {
return gameCodecs.includes(cached.codec) ? cached.codec : DEFAULTS.codec;
}
+export function savesRecordingsToDevice() {
+ return cached.saveToDevice;
+}
+
export function isInGameRecordingAvailable() {
return inGameRecordingAvailable;
}
diff --git a/GameData/JustReadTheInstructions/Web/js/recordings-autosave.js b/GameData/JustReadTheInstructions/Web/js/recordings-autosave.js
new file mode 100644
index 0000000..99258de
--- /dev/null
+++ b/GameData/JustReadTheInstructions/Web/js/recordings-autosave.js
@@ -0,0 +1,63 @@
+import { API, RECORDINGS_REFRESH_MS } from './config.js';
+import { fetchRecordings } from './api.js';
+import { IS_HANDHELD, savesRecordingsToDevice, updateSettings } from './recorder-settings.js';
+import { h } from './dom.js';
+import { toast } from './ui.js';
+
+const SAVED_KEY = 'jrti.recordings.saved.v1';
+const SAVED_LIMIT = 100;
+
+let timer = null;
+let seen = null;
+
+function claim(file) {
+ try {
+ const saved = JSON.parse(localStorage.getItem(SAVED_KEY)) ?? [];
+ if (saved.includes(file)) return false;
+ localStorage.setItem(SAVED_KEY, JSON.stringify([...saved, file].slice(-SAVED_LIMIT)));
+ } catch {
+ }
+ return true;
+}
+
+function download(file) {
+ const link = h('a', { href: API.recording(file, true), download: file, hidden: true });
+ document.body.append(link);
+ link.click();
+ link.remove();
+ if (IS_HANDHELD) toast(`Saving ${file} to this phone`, { label: 'Turn off', onAction: turnOff });
+ else toast(`Saving ${file} to this device`);
+}
+
+function turnOff() {
+ updateSettings({ saveToDevice: false });
+ syncRecordingsAutoSave();
+ toast('Recordings stay on the KSP computer. Turn this back on in Settings');
+}
+
+async function poll() {
+ let recordings;
+ try {
+ recordings = await fetchRecordings();
+ } catch {
+ return;
+ }
+ const finished = recordings.filter((r) => !r.recording).map((r) => r.file);
+ if (!seen) {
+ seen = new Set(finished);
+ return;
+ }
+ for (const file of finished.filter((f) => !seen.has(f))) {
+ seen.add(file);
+ if (claim(file)) download(file);
+ }
+}
+
+export function syncRecordingsAutoSave() {
+ clearInterval(timer);
+ timer = null;
+ seen = null;
+ if (!savesRecordingsToDevice()) return;
+ poll();
+ timer = setInterval(poll, RECORDINGS_REFRESH_MS);
+}
diff --git a/GameData/JustReadTheInstructions/Web/js/settings-ui.js b/GameData/JustReadTheInstructions/Web/js/settings-ui.js
index bebb37a..d41163b 100644
--- a/GameData/JustReadTheInstructions/Web/js/settings-ui.js
+++ b/GameData/JustReadTheInstructions/Web/js/settings-ui.js
@@ -1,5 +1,6 @@
import { VIDEO_CODECS } from './config.js';
-import { updateSettings, isInGameRecordingAvailable, getGameCodecs, selectedGameCodec } from './recorder-settings.js';
+import { IS_HANDHELD, updateSettings, isInGameRecordingAvailable, getGameCodecs, selectedGameCodec, savesRecordingsToDevice } from './recorder-settings.js';
+import { syncRecordingsAutoSave } from './recordings-autosave.js';
import { Sheet } from './ui.js';
const CODEC_LABELS = {
@@ -7,6 +8,11 @@ const CODEC_LABELS = {
[VIDEO_CODECS.AV1]: 'AV1 (advanced, limited support)',
};
+const SAVE_LABELS = {
+ keep: 'Keep on the KSP computer only',
+ device: 'Also save them to this device',
+};
+
const CODEC_WARNING =
'Only change the codec if you know your video tools support it.\n\n' +
'H.264 opens in every editor, player, phone and OBS setup. AV1 keeps more detail at the same file size, ' +
@@ -29,6 +35,8 @@ function availableCodecLabels() {
function render(controls) {
const codec = selectedGameCodec();
renderOptions(controls.codec, availableCodecLabels(), codec);
+ renderOptions(controls.save, SAVE_LABELS, savesRecordingsToDevice() ? 'device' : 'keep');
+ document.getElementById('settings-save-warning').hidden = !(IS_HANDHELD && savesRecordingsToDevice());
document.getElementById('settings-codec-row').hidden = !isInGameRecordingAvailable();
document.getElementById('settings-unavailable').hidden = isInGameRecordingAvailable();
document.getElementById('settings-codec-warning').hidden = codec === VIDEO_CODECS.H264;
@@ -39,6 +47,7 @@ export function mountSettingsUI() {
const sheetEl = document.getElementById('settings-sheet');
const controls = {
codec: document.getElementById('settings-codec'),
+ save: document.getElementById('settings-save'),
};
if (!openBtn || !sheetEl || Object.values(controls).some((el) => !el)) return;
@@ -57,4 +66,10 @@ export function mountSettingsUI() {
updateSettings({ codec });
render(controls);
});
+
+ controls.save.addEventListener('change', () => {
+ updateSettings({ saveToDevice: controls.save.value === 'device' });
+ syncRecordingsAutoSave();
+ render(controls);
+ });
}
diff --git a/docs/recording.md b/docs/recording.md
index 7f5717b..36025e3 100644
--- a/docs/recording.md
+++ b/docs/recording.md
@@ -16,6 +16,22 @@ Example: `Booster_Cam__cam10__2026-09-25_210455.mp4` is the camera named "Booste
The **Recordings** button at the top of the page lists every recording, newest first. **Play** opens one in a new tab and **Download** saves a copy to the device you are using, so you can open the web UI from another machine and copy a recording to it.
+## Saving recordings on another computer
+
+When you open the web UI on another computer, for example the one you stream or edit on, each recording is downloaded to that computer's Downloads folder when it stops. The recording stays on the KSP computer too.
+
+This is on by default on every device except the KSP computer itself (the web UI opened as `localhost`). To turn it off on a device, open **Settings** there and set **Finished recordings** to **Keep on the KSP computer only**. The choice is remembered per browser.
+
+* Keep the page open: only recordings that finish while it is open are downloaded.
+* The first time, the browser may ask to allow the page to download several files. Allow it.
+* With several tabs open in the same browser, only one of them downloads each recording.
+
+!!! warning "On a phone or tablet"
+ This is on there too, and each recording can be several GB, downloaded over your Wi-Fi or mobile data. Each download shows a message with **Turn off**, and **Settings** warns about it while it is on.
+
+!!! note
+ Recording on another computer does not make the game faster. To record or stream a camera, KSP has to draw it, and drawing it is what costs performance. Encoding the video is a small part of it. Fewer cameras, a lower resolution or a lower Max FPS help more.
+
## What a recording is
Every recording is an MP4 at the camera's render resolution, at a constant frame rate (Max FPS), with a keyframe every 2 seconds and a bitrate of 0.2 bits per pixel per frame (about 12 Mbps at 1080p 30 FPS).