mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 17:16:16 -08:00
- 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.
22 lines
383 B
JavaScript
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,
|
|
}
|
|
}
|
|
}
|