mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
添加白名单功能
This commit is contained in:
1 parent
970e7e3b89
commit
02c45caa38
11 files changed
+253
-43
No files matched your search
@@ -24,6 +24,7 @@ import Mask from './mask';
|
||||
import Setting from './setting';
|
||||
import Storage from './storage';
|
||||
import Plugins from './plugins';
|
||||
import Mobile from './mobile';
|
||||
|
||||
let id = 0;
|
||||
class Artplayer extends Emitter {
|
||||
@@ -111,22 +112,26 @@ class Artplayer extends Emitter {
|
||||
|
||||
this.whitelist = new Whitelist(this);
|
||||
this.template = new Template(this);
|
||||
this.storage = new Storage(this);
|
||||
this.i18n = new I18n(this);
|
||||
this.notice = new Notice(this);
|
||||
this.events = new Events(this);
|
||||
this.player = new Player(this);
|
||||
this.mse = new Mse(this);
|
||||
this.layers = new Layers(this);
|
||||
this.controls = new Controls(this);
|
||||
this.contextmenu = new Contextmenu(this);
|
||||
this.subtitle = new Subtitle(this);
|
||||
this.info = new Info(this);
|
||||
this.loading = new Loading(this);
|
||||
this.hotkey = new Hotkey(this);
|
||||
this.mask = new Mask(this);
|
||||
this.setting = new Setting(this);
|
||||
this.plugins = new Plugins(this);
|
||||
if (this.whitelist.state) {
|
||||
this.storage = new Storage(this);
|
||||
this.i18n = new I18n(this);
|
||||
this.notice = new Notice(this);
|
||||
this.events = new Events(this);
|
||||
this.player = new Player(this);
|
||||
this.mse = new Mse(this);
|
||||
this.layers = new Layers(this);
|
||||
this.controls = new Controls(this);
|
||||
this.contextmenu = new Contextmenu(this);
|
||||
this.subtitle = new Subtitle(this);
|
||||
this.info = new Info(this);
|
||||
this.loading = new Loading(this);
|
||||
this.hotkey = new Hotkey(this);
|
||||
this.mask = new Mask(this);
|
||||
this.setting = new Setting(this);
|
||||
this.plugins = new Plugins(this);
|
||||
} else {
|
||||
this.mobile = new Mobile(this);
|
||||
}
|
||||
|
||||
id += 1;
|
||||
this.id = id;
|
||||
@@ -146,4 +151,4 @@ Object.defineProperty(Artplayer, 'instances', {
|
||||
});
|
||||
|
||||
window.Artplayer = Artplayer;
|
||||
export default Artplayer;
|
||||
export default Artplayer;
|
||||
Reference in new issue
Block a user