From 86ab2f9edb200b98571bf4e80b937da5386377a9 Mon Sep 17 00:00:00 2001 From: Willy-JL Date: Thu, 25 Aug 2022 20:48:13 +0200 Subject: [PATCH 1/2] Mention possible fix for local resource in README (#392) --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index bb6d76a351..a13dce7c4e 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,14 @@ const ffmpeg = createFFmpeg({ }); ``` +Keep in mind that for compatibility with webworkers and nodejs this will default to a local path, so it will attempt to look for 'static/js/ffmpeg.core.js' locally, often resulting in a local resource error. If you wish to use a core version hosted on your own domain, you might reference it relatively like this: + +```javascript +const ffmpeg = createFFmpeg({ + corePath: new URL('static/js/ffmpeg-core.js', document.location).href, +}); +``` + For the list available versions and their changelog, please check: https://github.com/ffmpegwasm/ffmpeg.wasm-core/releases ### Use single thread version From ae61fa8db4259122057da1fb31c483565b31197f Mon Sep 17 00:00:00 2001 From: Willy-JL Date: Thu, 25 Aug 2022 20:50:28 +0200 Subject: [PATCH 2/2] Add code md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a13dce7c4e..89e8daac15 100644 --- a/README.md +++ b/README.md @@ -105,7 +105,7 @@ const ffmpeg = createFFmpeg({ }); ``` -Keep in mind that for compatibility with webworkers and nodejs this will default to a local path, so it will attempt to look for 'static/js/ffmpeg.core.js' locally, often resulting in a local resource error. If you wish to use a core version hosted on your own domain, you might reference it relatively like this: +Keep in mind that for compatibility with webworkers and nodejs this will default to a local path, so it will attempt to look for `'static/js/ffmpeg.core.js'` locally, often resulting in a local resource error. If you wish to use a core version hosted on your own domain, you might reference it relatively like this: ```javascript const ffmpeg = createFFmpeg({