mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
feat: add artplayer-plugin-jassub with initial implementation and documentation
This commit is contained in:
1 parent
0bb4e1acdb
commit
fce3b33909
8 files changed
+118
No files matched your search
@@ -0,0 +1,12 @@
|
||||
// npm i artplayer-plugin-jassub
|
||||
// import artplayerPluginJassub from 'artplayer-plugin-jassub';
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
plugins: [
|
||||
artplayerPluginJassub({
|
||||
//
|
||||
}),
|
||||
],
|
||||
});
|
||||
@@ -120,6 +120,10 @@
|
||||
<a
|
||||
href="/?libs=./uncompiled/artplayer-plugin-liquid-glass/index.js&example=liquid.glass">artplayer-plugin-liquid-glass</a>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
href="/?libs=./uncompiled/artplayer-plugin-jassub/index.js&example=jassub">artplayer-plugin-jassub</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul>
|
||||
<li class="title">Proxys</li>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
.parcel-cache
|
||||
yarn.lock
|
||||
package-lock.json
|
||||
src
|
||||
@@ -0,0 +1,11 @@
|
||||
# artplayer-plugin-jassub
|
||||
|
||||
jassub plugin for ArtPlayer
|
||||
|
||||
## Demo
|
||||
|
||||
[https://artplayer.org](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-jassub/index.js&example=jassub)
|
||||
|
||||
## License
|
||||
|
||||
MIT © Harvey Zack
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "artplayer-plugin-jassub",
|
||||
"version": "1.0.0",
|
||||
"description": "jassub plugin for ArtPlayer",
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://artplayer.org",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/zhw2590582/ArtPlayer.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/zhw2590582/ArtPlayer/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"html5",
|
||||
"video",
|
||||
"player"
|
||||
],
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./types/artplayer-plugin-jassub.d.ts",
|
||||
"import": "./dist/artplayer-plugin-jassub.mjs",
|
||||
"require": "./dist/artplayer-plugin-jassub.js"
|
||||
},
|
||||
"./legacy": {
|
||||
"types": "./types/artplayer-plugin-jassub.d.ts",
|
||||
"import": "./dist/artplayer-plugin-jassub.legacy.js",
|
||||
"require": "./dist/artplayer-plugin-jassub.legacy.js"
|
||||
|
||||
}
|
||||
},
|
||||
"main": "dist/artplayer-plugin-jassub.js",
|
||||
"module": "./dist/artplayer-plugin-jassub.mjs",
|
||||
"types": "types/artplayer-plugin-jassub.d.ts",
|
||||
"legacy": "dist/artplayer-plugin-jassub.legacy.js",
|
||||
"browserslist": "last 1 Chrome version"
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import style from 'bundle-text:./style.less';
|
||||
|
||||
export default function artplayerPluginJassub(option) {
|
||||
return (art) => {
|
||||
return {
|
||||
name: 'artplayerPluginJassub',
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof document !== 'undefined') {
|
||||
const id = 'artplayer-plugin-jassub';
|
||||
let $style = document.getElementById(id)
|
||||
if (!$style) {
|
||||
$style = document.createElement('style')
|
||||
$style.id = id
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.head.appendChild($style)
|
||||
})
|
||||
}
|
||||
else {
|
||||
(document.head || document.documentElement).appendChild($style)
|
||||
}
|
||||
}
|
||||
$style.textContent = style
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
window.artplayerPluginJassub = artplayerPluginJassub;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
.artplayer-plugin-jassub {
|
||||
//
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import type Artplayer from 'artplayer';
|
||||
|
||||
interface Option {
|
||||
//
|
||||
}
|
||||
|
||||
interface Result {
|
||||
name: 'artplayerPluginJassub';
|
||||
}
|
||||
|
||||
declare const artplayerPluginJassub: (option: Option) => (art: Artplayer) => Result;
|
||||
|
||||
export default artplayerPluginJassub
|
||||
Reference in new issue
Block a user