mirror of
https://git.um-react.app/um/um-react.git
synced 2025-11-28 03:23:02 +00:00
13 lines
434 B
TypeScript
13 lines
434 B
TypeScript
import { WorkerServerBus } from '~/util/WorkerEventBus';
|
|
import { DECRYPTION_WORKER_ACTION_NAME } from './constants';
|
|
|
|
const bus = new WorkerServerBus();
|
|
onmessage = bus.onmessage;
|
|
|
|
bus.addEventHandler(DECRYPTION_WORKER_ACTION_NAME.DECRYPT, async (blobURI) => {
|
|
const blob = await fetch(blobURI).then((r) => r.arrayBuffer());
|
|
// TODO: Implement decryptor for blob received here.
|
|
console.log(blob);
|
|
return { hello: true };
|
|
});
|