Skip to content

Commit 695c129

Browse files
committed
feature: update readme
1 parent 3db8adc commit 695c129

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ var options = {
6060
canvas: document.getElementById('canvas'), // canvas element
6161
subUrl: '/test/test.ass', // Link to subtitles
6262
fonts: ['/test/font-1.ttf', '/test/font-2.ttf'], // Links to fonts (not required, default font already included in build)
63-
workerUrl: '/libassjs-worker.js' // Link to file "libassjs-worker.js"
63+
workerUrl: '/libassjs-worker.js', // Link to file "libassjs-worker.js"
64+
wasmUrl: '/libassjs.wasm', // Link to file "libassjs.wasm" (not required, default loaded by workerUrl)
6465
};
6566
var instance = new SubtitlesOctopus(options);
6667
// And then...
@@ -111,6 +112,8 @@ When creating an instance of SubtitleOctopus, you can set the following options:
111112
- `subContent`: The content of the subtitle file to play. (Require either
112113
`subContent` or `subUrl` to be specified)
113114
- `workerUrl`: The URL of the worker. (Default: `libassjs-worker.js`)
115+
- `wasmUrl`: The URL of the WebAssembly file. (if your wasm file is not in the
116+
same directory as the worker, you need to specify this) (Optional)
114117
- `fonts`: An array of links to the fonts used in the subtitle. (Optional)
115118
- `availableFonts`: Object with all available fonts - Key is font name in lower
116119
case, value is link: `{"arial": "/font1.ttf"}` (Optional)

0 commit comments

Comments
 (0)