jassub 1.1.5 → 1.1.8
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 +4 -2
- package/dist/jassub-worker-legacy.js +9 -9
- package/dist/jassub-worker.wasm +0 -0
- package/dist/jassub.es.js +13 -9
- package/dist/jassub.umd.js +1 -1
- package/package.json +1 -1
- package/src/jassub.js +13 -9
package/README.md
CHANGED
|
@@ -43,11 +43,13 @@ npm i jassub
|
|
|
43
43
|
|
|
44
44
|
```js
|
|
45
45
|
import JASSUB from 'jassub'
|
|
46
|
+
import workerUrl from 'jassub/dist/jassub-worker.js?url'
|
|
47
|
+
import 'jassub/dist/jassub-worker.wasm?url'
|
|
46
48
|
|
|
47
49
|
const renderer = new JASSUB({
|
|
48
50
|
video: document.querySelector('video'),
|
|
49
51
|
subContent: subtitleString,
|
|
50
|
-
workerUrl: new URL('jassub/dist/jassub-worker.js', import.meta.url)
|
|
52
|
+
workerUrl // you can also use: `new URL('jassub/dist/jassub-worker.js', import.meta.url)` instead of importing it as an url
|
|
51
53
|
})
|
|
52
54
|
```
|
|
53
55
|
## Using only with canvas
|
|
@@ -240,4 +242,4 @@ Run git clone --recursive https://github.com/ThaUnknown/jassub.git
|
|
|
240
242
|
1. Install the dependency packages listed above
|
|
241
243
|
2. make
|
|
242
244
|
- If on macOS with libtool from brew, LIBTOOLIZE=glibtoolize make
|
|
243
|
-
3. Artifacts are in /dist/js
|
|
245
|
+
3. Artifacts are in /dist/js
|