jassub 2.0.0 → 2.0.2

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 CHANGED
@@ -22,6 +22,15 @@ JASSUB is a JS wrapper for <a href="https://github.com/libass/libass">libass</a>
22
22
 
23
23
  ## Usage
24
24
 
25
+ ```json
26
+ {
27
+ "Cross-Origin-Embedder-Policy": "require-corp",
28
+ "Cross-Origin-Opener-Policy": "same-origin"
29
+ }
30
+ ```
31
+
32
+ Headers are required to use this library, as it uses SharedArrayBuffer for multi-threading!!!
33
+
25
34
  ```shell
26
35
  [p]npm i jassub
27
36
  ```
package/dist/jassub.js CHANGED
@@ -55,7 +55,7 @@ export default class JASSUB {
55
55
  this.prescaleFactor = opts.prescaleFactor ?? 1.0;
56
56
  this.prescaleHeightLimit = opts.prescaleHeightLimit ?? 1080;
57
57
  this.maxRenderHeight = opts.maxRenderHeight ?? 0; // 0 - no limit.
58
- this._worker = new Worker(opts.workerUrl ?? new URL('./worker/worker.ts', import.meta.url), { name: 'jassub-worker', type: 'module' });
58
+ this._worker = new Worker(opts.workerUrl ?? new URL('./worker/worker.js', import.meta.url), { name: 'jassub-worker', type: 'module' });
59
59
  const Renderer = wrap(this._worker);
60
60
  const modern = opts.modernWasmUrl ?? new URL('./wasm/jassub-worker-modern.wasm', import.meta.url).href;
61
61
  const fallback = opts.wasmUrl ?? new URL('./wasm/jassub-worker.wasm', import.meta.url).href;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jassub",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "libass subtitle renderer for modern browsers",
5
5
  "main": "dist/jassub.js",
6
6
  "type": "module",