Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Is the main code always downloaded from CDN? #699

Unanswered
howtomakeaturn asked this question in Q&A
Discussion options

Hi, thanks for the great library! It's really awesome!

I have a question: Is the main code always downloaded from CDN?

In the page:

https://ffmpegwasm.netlify.app/docs/getting-started/usage

The main library code is downloaded from CDN.

And these two lines are commented out:

// import { FFmpeg } from '@ffmpeg/ffmpeg';
// import { fetchFile, toBlobURL } from '@ffmpeg/util';

But in another page:

https://ffmpegwasm.netlify.app/docs/getting-started/installation/

As @ffmpeg/ffmpeg spawns a web worker, you cannot import @ffmpeg/ffmpeg from CDN like unpkg. It is recommended to download it and host it on your server most of the time.

It's a bit confusing to me.

Should I host it or just use CDN?

Why those two lines are commented out in the tutorial page?

Do these 2 official pages contradictory to each other?

Thanks! 🙏🙏🙏

You must be logged in to vote

Replies: 2 comments

Comment options

use cdn add serviceWorker cache the file

You must be logged in to vote
0 replies
Comment options

No, it's not necessary to use a CDN. You can host all (or almost all?) the files yourself. See this MR as an example.

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /