Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Proof of concept to let ffmpeg.wasm work in angular #562

Closed

Conversation

DeepHorizons
Copy link

Attempt to fix #560 and #548

I am not a web developer and am not familiar with the tools to compile or test this locally. If someone could point me in the direction of some tutorials / docs on that I can test this in an angular app.

@netlify
Copy link

netlify bot commented Aug 24, 2023

Deploy Preview for ffmpegwasm canceled.

Name Link
🔨 Latest commit a174d04
🔍 Latest deploy log https://app.netlify.com/sites/ffmpegwasm/deploys/64e7ad765564eb00080654a0

Copy link

@KenZync KenZync left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this

@LostBeard LostBeard mentioned this pull request Sep 26, 2023
@th-m
Copy link

th-m commented Oct 12, 2023

I would love to have this merged

@fromage9747
Copy link

same here...

@steam0r
Copy link

steam0r commented Oct 20, 2023

for what it's worth. if you need this as a quickfix in javascript, edit vanilla-app/public/assets/ffmpeg/package/dist/umd/ffmpeg.js to have the load method look like this:

load = (r = {}) => (this.#e || (this.#e = new Worker(r.workerLoadURL ? r.workerLoadURL : new URL(e.p + e.u(814), e.b), {type: void 0}), this.#o()), this.#i({
    type: t.LOAD,
    data: r
}));

then give a workerLoadURL in ffmpg.load():

const options = {
    "coreURL": await toBlobURL(coreFile, "text/javascript"),
    "wasmURL": await toBlobURL(wasmFile, "application/wasm"),
    "workerLoadURL": await toBlobURL(workerFile, "text/javascript")
};
await ffmpeg.load(options);

@ronaldohoch
Copy link

Hi guys, any news about this solution?

@jeromewu jeromewu added the help wanted Extra attention is needed label Dec 17, 2023
@jeromewu
Copy link
Collaborator

Fixed by #652

@jeromewu jeromewu closed this Dec 17, 2023
@ayoubqrt
Copy link

ayoubqrt commented Dec 17, 2023

Hi @jeromewu , why did you create you own pull request instead of contributing to this one ? (I'm just curious)

@jeromewu
Copy link
Collaborator

@ayoubqrt Sorry about that, there was another PR (#639) fixing the same issue and I tried to fix it with my own PR (#652) as I am not sure if the author will respond to my comments soon. And later I found this PR is actually doing the same fix (The name was misleading, so I am not aware of that in the first place). I have no intention to redo the work here.

@ayoubqrt
Copy link

Okay no problem at all @jeromewu . Thank you for the clarification. I think it would have been nice anyway to wait his answer but I understand that it can be frustrating as you want to ship the fix. Have a nice day !

@ronaldohoch
Copy link

@jeromewu tested here and it don't worked.
Tested in Angular 16 and in Angular 17, with your code sample and it wont load the worker :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SecurityError: Failed to construct 'Worker'
8 participants