mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
remove artplayer-plugin-ass
This commit is contained in:
1 parent
5cdf65d32f
commit
785ad52e60
9 files changed
-132
No files matched your search
@@ -32,7 +32,6 @@
|
||||
| [artplayer-plugin-danmuku](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-danmuku) | Danmuku plugin | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=danmuku) |
|
||||
| [artplayer-plugin-gif](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-gif) | Gif plugin | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif) |
|
||||
| [artplayer-plugin-backlight](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-backlight) | Backlight plugin | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-backlight.js&example=backlight) |
|
||||
| [artplayer-plugin-ass](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-plugin-ass) | ASS enhanced plugin | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-plugin-ass.js&example=ass) |
|
||||
| [artplayer-tool-thumbnail](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-thumbnail) | Thumbnail tool | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-thumbnail.js&example=thumbnail) |
|
||||
| [artplayer-tool-github](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-tool-github) | Github Danmuku tool | [demo](https://artplayer.org/?libs=.%2Funcompiled%2Fartplayer-tool-github.js%0A.%2Funcompiled%2Fartplayer-plugin-danmuku.js&example=github) | |
|
||||
| [artplayer-react](https://github.com/zhw2590582/ArtPlayer/tree/master/packages/artplayer-react) | React Component | [demo](https://codesandbox.io/s/n74859y9rl) |
|
||||
|
||||
@@ -36,9 +36,6 @@
|
||||
<li>
|
||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-gif.js&example=gif">artplayer-plugin-gif</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="./?libs=.%2Funcompiled%2Fartplayer-plugin-ass.js&example=ass">artplayer-plugin-ass</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="title">Tools</li>
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
test
|
||||
coverage
|
||||
.nyc_output
|
||||
.cache
|
||||
docs
|
||||
@@ -1 +0,0 @@
|
||||
package-lock=false
|
||||
@@ -1,47 +0,0 @@
|
||||
# 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/)
|
||||
@@ -1,8 +0,0 @@
|
||||
/*!
|
||||
* artplayer-plugin-ass.js v3.5.27
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer#readme
|
||||
* (c) 2017-2020 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("assjs")):"function"==typeof define&&define.amd?define(["assjs"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).artplayerPluginAss=t(e.ASS)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);return function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&i.firstChild?i.insertBefore(r,i.firstChild):i.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}(".artplayer-plugin-ass{bottom:0!important}"),function(e){return function(t){var i=null;return fetch(e).then((function(e){return e.text()})).then((function(e){var r=t.template,s=r.$video,o=r.$subtitle;o.classList.add("artplayer-plugin-ass"),t.once("ready",(function(){(i=new n.default(e,s,{container:o,resampling:"video_width"})).resize(),t.emit("artplayerPluginAss",i),t.on("resize",(function(){return i.resize()})),t.on("destroy",(function(){return i.destroy()}))}))})),{name:"artplayerPluginAss",ass:i}}}}));
|
||||
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"name": "artplayer-plugin-ass",
|
||||
"version": "3.5.27",
|
||||
"expose": "artplayerPluginAss",
|
||||
"description": "Ass plugin for ArtPlayer",
|
||||
"main": "dist/artplayer-plugin-ass.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"keywords": [
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"homepage": "https://github.com/zhw2590582/ArtPlayer#readme",
|
||||
"gitHead": "5ea211ef738351668e4acace326af4ff6947e2ee",
|
||||
"dependencies": {
|
||||
"assjs": "^0.0.11"
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
import ASS from 'assjs';
|
||||
import './style.scss';
|
||||
|
||||
function artplayerPluginAss(url) {
|
||||
return (art) => {
|
||||
let ass = null;
|
||||
fetch(url)
|
||||
.then((res) => res.text())
|
||||
.then((text) => {
|
||||
const { $video, $subtitle } = art.template;
|
||||
$subtitle.classList.add('artplayer-plugin-ass');
|
||||
|
||||
art.once('ready', () => {
|
||||
ass = new ASS(text, $video, {
|
||||
container: $subtitle,
|
||||
resampling: 'video_width',
|
||||
});
|
||||
|
||||
ass.resize();
|
||||
art.emit('artplayerPluginAss', ass);
|
||||
art.on('resize', () => ass.resize());
|
||||
art.on('destroy', () => ass.destroy());
|
||||
});
|
||||
});
|
||||
return {
|
||||
name: 'artplayerPluginAss',
|
||||
ass,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export default artplayerPluginAss;
|
||||
@@ -1,3 +0,0 @@
|
||||
.artplayer-plugin-ass {
|
||||
bottom: 0 !important;
|
||||
}
|
||||
Reference in new issue
Block a user