mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-26 08:51:20 -08:00
add artplayer-plugin-ass
This commit is contained in:
1 parent
f414b9d9a4
commit
d911e206f4
13 files changed
+2357
-4
No files matched your search
@@ -0,0 +1,47 @@
|
||||
# artplayer-plugin-ass
|
||||
|
||||
Ass plugin for ArtPlayer, use [weizhenye/ASS](https://github.com/weizhenye/ASS) as a dependency
|
||||
|
||||
## Demo
|
||||
|
||||
[Checkout the demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-ass.js&example=ass) from Github Pages
|
||||
|
||||
## Install
|
||||
|
||||
Install with `npm`
|
||||
|
||||
```bash
|
||||
$ npm install artplayer-plugin-ass
|
||||
```
|
||||
|
||||
Or install with `yarn`
|
||||
|
||||
```bash
|
||||
$ yarn add artplayer-plugin-ass
|
||||
```
|
||||
|
||||
```js
|
||||
import artplayerPluginAss from 'artplayer-plugin-ass';
|
||||
```
|
||||
|
||||
Or umd builds are also available
|
||||
|
||||
```html
|
||||
<script src="artplayer-plugin-ass.js"></script>
|
||||
```
|
||||
|
||||
Will expose the global variable to `window.artplayerPluginAss`.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: 'path/to/video.mp4',
|
||||
plugins: [artplayerPluginAss('path/to/subtitle.ass')],
|
||||
});
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Harvey Zack](https://sleepy.im/)
|
||||
Reference in new issue
Block a user