mirror of
https://github.com/rishikanthc/Scriberr.git
synced 2026-03-03 03:57:01 +00:00
fix playback control button
This commit is contained in:
@@ -82,8 +82,6 @@ export const AudioPlayer = forwardRef<AudioPlayerRef, AudioPlayerProps>(({
|
||||
|
||||
wavesurferRef.current = ws;
|
||||
|
||||
await ws.load(url);
|
||||
|
||||
ws.on('ready', () => {
|
||||
setIsReady(true);
|
||||
const dur = ws.getDuration();
|
||||
@@ -117,6 +115,8 @@ export const AudioPlayer = forwardRef<AudioPlayerRef, AudioPlayerProps>(({
|
||||
onPlayStateChange?.(false);
|
||||
});
|
||||
|
||||
await ws.load(url);
|
||||
|
||||
} catch (error) {
|
||||
console.error('Error initializing audio player:', error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user