Fixes to voice notes playback
This commit is contained in:
parent
fad0529080
commit
3d4248e070
9 changed files with 285 additions and 274 deletions
|
@ -155,11 +155,14 @@ export async function computePeaks(
|
|||
|
||||
const pending = inProgressMap.get(computeKey);
|
||||
if (pending) {
|
||||
log.info('GlobalAudioContext: already computing peaks for', computeKey);
|
||||
log.info(
|
||||
'VoiceNotesPlaybackContext: already computing peaks for',
|
||||
computeKey
|
||||
);
|
||||
return pending;
|
||||
}
|
||||
|
||||
log.info('GlobalAudioContext: queue computing peaks for', computeKey);
|
||||
log.info('VoiceNotesPlaybackContext: queue computing peaks for', computeKey);
|
||||
const promise = computeQueue.add(() => doComputePeaks(url, barCount));
|
||||
|
||||
inProgressMap.set(computeKey, promise);
|
||||
|
@ -178,10 +181,7 @@ export const VoiceNotesPlaybackContext =
|
|||
React.createContext<Contents>(globalContents);
|
||||
|
||||
export type VoiceNotesPlaybackProps = {
|
||||
conversationId: string | undefined;
|
||||
isPaused: boolean;
|
||||
children?: React.ReactNode | React.ReactChildren;
|
||||
unloadMessageAudio: () => void;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue