Skip to content

Commit 0b7c43b

Browse files
author
Aleksander Grygier
committed
feat: Data improvements
1 parent 0f0405c commit 0b7c43b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

apps/web/src/lib/components/Recorder.svelte

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@
5050
backend: 'MediaElement'
5151
});
5252
53+
wavesurfer.on('finish', () => {
54+
if (recordingUrl) {
55+
wavesurfer.load(recordingUrl);
56+
}
57+
});
58+
5359
record = wavesurfer.registerPlugin(
5460
RecordPlugin.create({ scrollingWaveform, renderRecordedAudio: true })
5561
);
@@ -80,6 +86,7 @@
8086
8187
async function stopPlayback() {
8288
wavesurfer.stop();
89+
wavesurfer.load(recordingUrl);
8390
}
8491
8592
async function startRecording() {

apps/web/src/lib/components/RecordingTile.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
5353
wavesurfer.on('finish', () => {
5454
isPlaying = false;
55-
// createWaveSurfer();
5655
5756
wavesurfer.load(url);
5857
});

0 commit comments

Comments
 (0)