@mediabunny/truehd 1.66.2 → 1.66.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/bundles/mediabunny-truehd.js +26 -14
- package/dist/bundles/mediabunny-truehd.min.js +3 -3
- package/dist/bundles/mediabunny-truehd.min.mjs +3 -3
- package/dist/bundles/mediabunny-truehd.mjs +26 -14
- package/dist/bundles/mediabunny-truehd.worker.js +2258 -0
- package/dist/modules/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -28,6 +28,14 @@ Alternatively, directly include them using a script tag:
|
|
|
28
28
|
|
|
29
29
|
This will expose the global objects `Mediabunny` and `MediabunnyTrueHd`. Use `mediabunny-truehd.d.ts` to provide types for these globals. You can download the built distribution files from the [releases page](https://github.com/Vanilagy/mediabunny/releases).
|
|
30
30
|
|
|
31
|
+
### Content Security Policy
|
|
32
|
+
|
|
33
|
+
The decoder and encoder run in a Web Worker, which by default is created from a `blob:` URL. If your Content Security Policy doesn't allow that, host `mediabunny-truehd.worker.js` yourself and point the extension to it before decoding or encoding starts:
|
|
34
|
+
```js
|
|
35
|
+
globalThis[Symbol.for('@mediabunny/truehd:workerUrl')] = '/path/to/mediabunny-truehd.worker.js';
|
|
36
|
+
```
|
|
37
|
+
The value must be a string or `URL`. You can download the worker file from the [releases page](https://github.com/Vanilagy/mediabunny/releases); it's also included in the npm package under `dist/bundles/`. Since the codecs use WebAssembly, your policy must also allow `'wasm-unsafe-eval'` in `script-src`.
|
|
38
|
+
|
|
31
39
|
## Usage
|
|
32
40
|
|
|
33
41
|
```ts
|