Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

Merge branch 'main' into fix/493-large-media-streaming

wiiiii1234c75d5b0bce4
diff --cc src/lib/exporter/streamingDecoder.test.ts
index dea43e96,f49e835c..7de21b5b
--- a/src/lib/exporter/streamingDecoder.test.ts
+++ b/src/lib/exporter/streamingDecoder.test.ts
@@@ -97,27 -90,22 +99,26 @@@ describe("StreamingVideoDecoder local m
mockDemuxerLoad
.mockRejectedValueOnce(new Error("get_media_info failed: Failed after 3 attempts"))
.mockResolvedValueOnce(undefined);
- window.electronAPI.readLocalFile = vi.fn(async () => ({
- success: true,
- data: new Uint8Array([1, 2, 3]),
- }));
--
const decoder = new StreamingVideoDecoder();
await decoder.loadMetadata("/tmp/fallback.mp4");
expect(mockDemuxerLoad).toHaveBeenNthCalledWith(
- 1,
+ 2,
"http://127.0.0.1:4321/video?path=%2Ftmp%2Ffallback.mp4",
);
- expect(mockReadLocalFile).not.toHaveBeenCalled();
- expect(mockDemuxerLoad.mock.calls[1]?.[0]).toBeInstanceOf(File);
- expect(window.electronAPI.readLocalFile).toHaveBeenCalledWith(
- "/tmp/fallback.mp4",
++ expect(window.electronAPI.readLocalFile).not.toHaveBeenCalled();
+ });
+
+ it("keeps an explicit local retry on the range-streamed URL", async () => {
+ const decoder = new StreamingVideoDecoder();
+ await decoder.loadMetadata("/tmp/retry.mp4", {
+ useFallbackMediaSource: true,
+ });
+
+ expect(mockDemuxerLoad).toHaveBeenCalledWith(
+ "http://127.0.0.1:4321/video?path=%2Ftmp%2Fretry.mp4",
);
- expect(mockReadLocalFile).not.toHaveBeenCalled();
++ expect(window.electronAPI.readLocalFile).not.toHaveBeenCalled();
});
});