mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-11 13:56:15 -08:00
22 lines
669 B
JavaScript
22 lines
669 B
JavaScript
import LibassAdapter from './adapter';
|
|
|
|
export default function artplayerPluginLibass(option) {
|
|
return (art) => {
|
|
const adapter = new LibassAdapter(art, option);
|
|
return {
|
|
name: 'artplayerPluginLibass',
|
|
libass: adapter.libass,
|
|
visible: adapter.visible,
|
|
init: adapter.init.bind(adapter),
|
|
switch: adapter.switch.bind(adapter),
|
|
show: adapter.show.bind(adapter),
|
|
hide: adapter.hide.bind(adapter),
|
|
destroy: adapter.destroy.bind(adapter),
|
|
};
|
|
};
|
|
}
|
|
|
|
if (typeof window !== 'undefined') {
|
|
window['artplayerPluginLibass'] = artplayerPluginLibass;
|
|
}
|