From 955ae13dae162db72751651a307a8e0d7c02b402 Mon Sep 17 00:00:00 2001 From: Priyangshu <182631201+Priyangshu-7@users.noreply.github.com> Date: Sat, 26 Sep 2026 02:18:55 +0530 Subject: [PATCH] fix(macOS): allow .m4a mic/system audio sidecars through the media allowlist --- electron/mediaTypes.test.ts | 13 +++++++++++++ electron/mediaTypes.ts | 1 + 2 files changed, 14 insertions(+) create mode 100644 electron/mediaTypes.test.ts diff --git a/electron/mediaTypes.test.ts b/electron/mediaTypes.test.ts new file mode 100644 index 000000000..9bcff6fe2 --- /dev/null +++ b/electron/mediaTypes.test.ts @@ -0,0 +1,13 @@ +import { describe, expect, it } from "vitest"; + +import { getMediaContentType, isSupportedLocalMediaPath } from "./mediaTypes"; + +describe("mediaTypes", () => { + it("recognizes .m4a as audio/mp4", () => { + expect(getMediaContentType("recording.m4a")).toBe("audio/mp4"); + }); + + it("supports .m4a as a local media path", () => { + expect(isSupportedLocalMediaPath("recording.m4a")).toBe(true); + }); +}); diff --git a/electron/mediaTypes.ts b/electron/mediaTypes.ts index 5c4307b63..a27fb39a1 100644 --- a/electron/mediaTypes.ts +++ b/electron/mediaTypes.ts @@ -8,6 +8,7 @@ export const MEDIA_CONTENT_TYPES: Record = { ".avi": "video/x-msvideo", ".wav": "audio/wav", ".mp3": "audio/mpeg", + ".m4a": "audio/mp4", ".ogg": "audio/ogg", ".png": "image/png", ".jpg": "image/jpeg",