mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 10:56:15 -08:00
update plugin
This commit is contained in:
1 parent
d5d16ed709
commit
5a59096f9b
1 file changed
+5
-1
+5
-1
@@ -78,7 +78,11 @@ class Artplayer extends Emitter {
|
||||
|
||||
const args = Array.from(arguments).slice(1);
|
||||
args.unshift(this);
|
||||
plugin.apply(null, args);
|
||||
if (typeof plugin.install === 'function') {
|
||||
plugin.install.apply(plugin, args);
|
||||
} else if (typeof plugin === 'function') {
|
||||
plugin.apply(null, args);
|
||||
}
|
||||
installedPlugins.push(plugin);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user