Summary
Follow-up to #912 (closed by #913): the microphone is still silent in the editor and in exports on macOS.
On macOS the mic track is always written to a recording-<ts>.mic.m4a sidecar, but .m4a is missing from MEDIA_CONTENT_TYPES in electron/mediaTypes.ts. resolveApprovedLocalMediaPath() rejects anything that fails isSupportedLocalMediaPath(), so get-local-media-url refuses the sidecar and the main process logs:
[get-local-media-url] Blocked disallowed path: .../recording-1790029932535.mic.m4a
[get-local-media-url] Blocked disallowed path: .../recording-1790029932535.system.m4a
Environment
- Recordly v1.4.0, built from
main @ 49926862 (arm64). The same allowlist ships in the released v1.4.0 — 7e87356c is contained in the tag — so this is not specific to a local build.
- macOS 15.4.1 (24E263), Apple Silicon
- Backend:
mac-screencapturekit (native capture helper)
Steps to reproduce
- Enable Microphone and System audio in the launch HUD.
- Record ~20s of a display while speaking.
- Stop, and play back in the editor.
Expected: the microphone is audible.
Actual: silence in preview and export, while the voice sits on disk in the sidecar:
recording-<ts>.mp4 mean_volume: -91.0 dB max_volume: -91.0 dB
recording-<ts>.mic.m4a mean_volume: -34.0 dB max_volume: -12.7 dB
recording-<ts>.system.m4a mean_volume: -91.0 dB max_volume: -91.0 dB
Root cause
muxNativeMacRecordingWithAudio() keeps the audio tracks as sidecars by design, and the renderer already expects them: SOURCE_SIDECAR_EXTENSIONS in src/components/video-editor/timeline/sourceAudioTracks.ts lists .m4a, and src/lib/exporter/localMediaSource.ts maps .m4a to audio/mp4. Only the main-process media allowlist is missing the type, so every sidecar request is denied. resolveMediaResourceUrl() then falls back to a file:// URL, which the editor window cannot load because it is served over http from the local media server.
Fix
One line in electron/mediaTypes.ts:
".mp3": "audio/mpeg",
+ ".m4a": "audio/mp4",
".ogg": "audio/ogg",
This does not widen the path allowlist: isAllowedLocalReadPath() still scopes reads to the recordings directory, userData, the asset root and temp. With this patch applied locally, mic audio plays in the editor and survives export, and npx vitest --run passes (226 tests, including electron/mediaServer.test.ts and electron/ipc/project/manager.test.ts).
Happy to open a PR if that helps.
Summary
Follow-up to #912 (closed by #913): the microphone is still silent in the editor and in exports on macOS.
On macOS the mic track is always written to a
recording-<ts>.mic.m4asidecar, but.m4ais missing fromMEDIA_CONTENT_TYPESinelectron/mediaTypes.ts.resolveApprovedLocalMediaPath()rejects anything that failsisSupportedLocalMediaPath(), soget-local-media-urlrefuses the sidecar and the main process logs:Environment
main@49926862(arm64). The same allowlist ships in the released v1.4.0 —7e87356cis contained in the tag — so this is not specific to a local build.mac-screencapturekit(native capture helper)Steps to reproduce
Expected: the microphone is audible.
Actual: silence in preview and export, while the voice sits on disk in the sidecar:
Root cause
muxNativeMacRecordingWithAudio()keeps the audio tracks as sidecars by design, and the renderer already expects them:SOURCE_SIDECAR_EXTENSIONSinsrc/components/video-editor/timeline/sourceAudioTracks.tslists.m4a, andsrc/lib/exporter/localMediaSource.tsmaps.m4atoaudio/mp4. Only the main-process media allowlist is missing the type, so every sidecar request is denied.resolveMediaResourceUrl()then falls back to afile://URL, which the editor window cannot load because it is served over http from the local media server.Fix
One line in
electron/mediaTypes.ts:".mp3": "audio/mpeg", + ".m4a": "audio/mp4", ".ogg": "audio/ogg",This does not widen the path allowlist:
isAllowedLocalReadPath()still scopes reads to the recordings directory, userData, the asset root and temp. With this patch applied locally, mic audio plays in the editor and survives export, andnpx vitest --runpasses (226 tests, includingelectron/mediaServer.test.tsandelectron/ipc/project/manager.test.ts).Happy to open a PR if that helps.