The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 12:15 UTC
fix(server): HTML previews load relative video and audio files (#36199)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Nov 14, 2026 at 20:52 UTC
3947e223515e3a15dc72011856fff9bad47a54c5
2 files changed
+21
apps/server/src/assets/AssetAccess.test.ts
+9
@@ -1012,6 +1012,15 @@ describe("AssetAccess", () => {
1012
kind: "file",
1013
path: canonicalCssPath,
1014
});
1015
+ yield* fileSystem.makeDirectory(path.join(root, "clips"));
1016
+ for (const mediaName of ["clips/clip.mp4", "clips/clip.webm", "clips/clip.mp3"]) {
1017
+ const mediaPath = path.join(root, mediaName);
1018
+ yield* fileSystem.writeFileString(mediaPath, "media bytes");
1019
+ expect(yield* resolveAsset(token, mediaName)).toMatchObject({
1020
+ kind: "file",
1021
+ path: yield* fileSystem.realPath(mediaPath),
1022
+ });
1023
+ }
1024
for (const extension of ["otf", "ttf", "woff", "woff2"]) {
1025
const fontName = `preview.${extension}`;
1026
const fontPath = path.join(root, fontName);
apps/server/src/assets/AssetAccess.ts
+12
@@ -94,6 +94,18 @@ const PREVIEW_ASSET_EXTENSIONS = new Set([
94
".png",
95
".svg",
96
".webp",
97
+ ".m4v",
98
+ ".mp4",
99
+ ".ogv",
100
+ ".webm",
101
+ ".aac",
102
+ ".flac",
103
+ ".m4a",
104
+ ".mp3",
105
+ ".oga",
106
+ ".ogg",
107
+ ".opus",
108
+ ".wav",
109
".css",
110
".js",
111
".mjs",