Suspend AudioContext to save resources

This commit is contained in:
Fedor Indutny 2021-08-02 11:31:01 -07:00 committed by GitHub
parent 73bcd3b531
commit f82639dc3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,6 +27,8 @@ export type Contents = {
// `audioContext` global, however, as the browser limits the number that can be
// created.)
const audioContext = new AudioContext();
audioContext.suspend();
const waveformCache: WaveformCache = new LRU({
max: MAX_WAVEFORM_COUNT,
});