Offload some more waveform processing onto a worker (#9223)
This commit is contained in:
parent
ca25c8f430
commit
e1f7b0af2c
15 changed files with 231 additions and 72 deletions
|
@ -20,6 +20,12 @@ import { logger } from "matrix-js-sdk/src/logger";
|
|||
import { createAudioContext, decodeOgg } from "../../src/audio/compat";
|
||||
import { Playback, PlaybackState } from "../../src/audio/Playback";
|
||||
|
||||
jest.mock("../../src/WorkerManager", () => ({
|
||||
WorkerManager: jest.fn(() => ({
|
||||
call: jest.fn().mockResolvedValue({ waveform: [0, 0, 1, 1] }),
|
||||
})),
|
||||
}));
|
||||
|
||||
jest.mock("../../src/audio/compat", () => ({
|
||||
createAudioContext: jest.fn(),
|
||||
decodeOgg: jest.fn(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue