Waveform: decode peaks in-renderer via Web Audio (no external ffmpeg needed)
The packaged app doesn't bundle ffmpeg, so on Macs without a system ffmpeg the waveform stayed blank. Compute peaks by reading the file bytes (new file:read IPC) and decoding with Web Audio's decodeAudioData in a low-rate AudioContext; ffmpeg in main remains only as a fallback. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
c98ebda03f
commit
0c2f2b8190
3 files changed
+47
-6
No files matched your search
+2
-1
@@ -35,5 +35,6 @@ contextBridge.exposeInMainWorld('djv', {
|
||||
savePlaylist: (data) => ipcRenderer.invoke('playlist:save', data),
|
||||
exportPlaylist: (data) => ipcRenderer.invoke('playlist:export', data),
|
||||
importPlaylist: () => ipcRenderer.invoke('playlist:import'),
|
||||
peaks: (path, buckets) => ipcRenderer.invoke('audio:peaks', path, buckets)
|
||||
peaks: (path, buckets) => ipcRenderer.invoke('audio:peaks', path, buckets),
|
||||
readFile: (path) => ipcRenderer.invoke('file:read', path)
|
||||
});
|
||||
Reference in new issue
Block a user