Files
ArtPlayer/packages/artplayer-plugin-jassub/src/index.js
T
Harvey Zhao 1e60637b74 refactor: remove global window assignment for Artplayer and template export
- Removed the assignment of Artplayer to the global window object in index.js of the artplayer package.
- Eliminated the window export for the template plugin in index.js, streamlining the code and reducing global scope pollution.
2026-03-07 20:24:29 +08:00

22 lines
383 B
JavaScript

import JASSUB from './jassub.es.js'
export default function artplayerPluginJassub(option) {
return (art) => {
const instance = new JASSUB({
video: art.video,
...option,
})
instance._canvasParent.style.zIndex = 20
art.on('destroy', () => {
instance.destroy()
})
return {
name: 'artplayerPluginJassub',
instance,
}
}
}