diff --git a/electron/mediaTypes.test.ts b/electron/mediaTypes.test.ts new file mode 100644 index 00000000..9bcff6fe --- /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 5c4307b6..a27fb39a 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",