From d7bbb4789cdadb6916b0a1d8d3b156a4e0461a6a Mon Sep 17 00:00:00 2001 From: Nakul Srivastava Date: Mon, 28 Sep 2026 14:16:00 +0530 Subject: [PATCH 1/9] fix(playback): allow recorded video from the asset protocol Co-Authored-By: Claude Opus 5.5 --- apps/desktop/src-tauri/tauri.conf.json | 2 +- apps/desktop/src/test/csp.test.ts | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 apps/desktop/src/test/csp.test.ts diff --git a/apps/desktop/src-tauri/tauri.conf.json b/apps/desktop/src-tauri/tauri.conf.json index 4f0ef66..0b41999 100644 --- a/apps/desktop/src-tauri/tauri.conf.json +++ b/apps/desktop/src-tauri/tauri.conf.json @@ -42,7 +42,7 @@ } ], "security": { - "csp": "default-src 'self' customprotocol: asset:; img-src 'self' asset: http://asset.localhost blob: data:; style-src 'self' 'unsafe-inline'; connect-src ipc: http://ipc.localhost", + "csp": "default-src 'self' customprotocol: asset:; img-src 'self' asset: http://asset.localhost blob: data:; media-src 'self' asset: http://asset.localhost blob:; style-src 'self' 'unsafe-inline'; connect-src ipc: http://ipc.localhost", "assetProtocol": { "enable": true, "scope": [ diff --git a/apps/desktop/src/test/csp.test.ts b/apps/desktop/src/test/csp.test.ts new file mode 100644 index 0000000..bf6e35c --- /dev/null +++ b/apps/desktop/src/test/csp.test.ts @@ -0,0 +1,15 @@ +import { describe, expect, it } from "vitest"; +import config from "../../src-tauri/tauri.conf.json"; + +/** + * Recordings play from the asset protocol (`http://asset.localhost/…`), so + * `media-src` must allow it. Without this, `