From 59c0efa0fb6d2f59f11060bf5cb984ab6df02f0c Mon Sep 17 00:00:00 2001 From: andreas Date: Thu, 28 Sep 2023 19:40:35 +0200 Subject: [PATCH] Fixed memory leak as suggested by Mathieu --- www/app/transcripts/recorder.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/www/app/transcripts/recorder.tsx b/www/app/transcripts/recorder.tsx index ae0eb96e..d43f7d5b 100644 --- a/www/app/transcripts/recorder.tsx +++ b/www/app/transcripts/recorder.tsx @@ -110,6 +110,12 @@ export default function Recorder(props: RecorderProps) { : undefined, }); + if (!props.transcriptId) + { + const _wshack: any = _wavesurfer; + _wshack.renderer.renderSingleCanvas = () => {}; + } + const wsWrapper = _wavesurfer.getWrapper(); wsWrapper.style.cursor = "pointer"; wsWrapper.style.backgroundColor = "RGB(240 240 240)";