Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 5c40159b authored by Simon Chan's avatar Simon Chan
Browse files

feat(tinyh264): set worker to use ES module

Vite needs this to work in dev mode
parent 7944e81e
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -98,7 +98,9 @@ type TinyH264Message =

export function createTinyH264Wrapper(): Promise<TinyH264Wrapper> {
    if (!worker) {
        worker = new Worker(new URL("./worker.js", import.meta.url));
        worker = new Worker(new URL("./worker.js", import.meta.url), {
            type: "module",
        });
        worker.addEventListener(
            "message",
            ({ data }: MessageEvent<TinyH264Message>) => {