mirror of
https://github.com/zoriya/libpgs-js.git
synced 2026-08-27 00:00:51 +00:00
Updated README.md.
This commit is contained in:
@@ -1 +1,28 @@
|
||||
# libpgs-js
|
||||
|
||||
This library renders the graphical subtitles format PGS _(.sub / .sup)_ in the browser.
|
||||
|
||||
## Usage
|
||||
|
||||
Install the package via npm:
|
||||
```
|
||||
npm i --save libpgs
|
||||
```
|
||||
|
||||
```html
|
||||
<div style="position: relative">
|
||||
<video id="video-element" src="./video.mp4"></video>
|
||||
</div>
|
||||
```
|
||||
|
||||
```javascript
|
||||
const videoElement = document.getElementById('video-element');
|
||||
const pgsRenderer = new libpgs.PgsRenderer({
|
||||
video: videoElement,
|
||||
subUrl: './subtitle.sup'
|
||||
});
|
||||
```
|
||||
|
||||
## Licence
|
||||
|
||||
[MIT License](LICENSE)
|
||||
|
||||
Reference in New Issue
Block a user