1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Offload some more waveform processing onto a worker (#9223)

This commit is contained in:
Michael Telatynski
2023-04-27 11:02:20 +01:00
committed by GitHub
parent ca25c8f430
commit e1f7b0af2c
15 changed files with 231 additions and 72 deletions

View File

@@ -26,6 +26,12 @@ import { createAudioContext } from "../../../../src/audio/compat";
import { flushPromises } from "../../../test-utils";
import { IRoomState } from "../../../../src/components/structures/RoomView";
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().mockResolvedValue({}),