Skip to content

Commit

Permalink
feature: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
huanghaiyang committed Jun 7, 2024
1 parent 3db8adc commit 695c129
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ var options = {
canvas: document.getElementById('canvas'), // canvas element
subUrl: '/test/test.ass', // Link to subtitles
fonts: ['/test/font-1.ttf', '/test/font-2.ttf'], // Links to fonts (not required, default font already included in build)
workerUrl: '/libassjs-worker.js' // Link to file "libassjs-worker.js"
workerUrl: '/libassjs-worker.js', // Link to file "libassjs-worker.js"
wasmUrl: '/libassjs.wasm', // Link to file "libassjs.wasm" (not required, default loaded by workerUrl)
};
var instance = new SubtitlesOctopus(options);
// And then...
Expand Down Expand Up @@ -111,6 +112,8 @@ When creating an instance of SubtitleOctopus, you can set the following options:
- `subContent`: The content of the subtitle file to play. (Require either
`subContent` or `subUrl` to be specified)
- `workerUrl`: The URL of the worker. (Default: `libassjs-worker.js`)
- `wasmUrl`: The URL of the WebAssembly file. (if your wasm file is not in the
same directory as the worker, you need to specify this) (Optional)
- `fonts`: An array of links to the fonts used in the subtitle. (Optional)
- `availableFonts`: Object with all available fonts - Key is font name in lower
case, value is link: `{"arial": "/font1.ttf"}` (Optional)
Expand Down

0 comments on commit 695c129

Please sign in to comment.