add Artplayer.DEGUG

This commit is contained in:
Harvey committed 2022-10-08 09:51:49 +08:00
1 parent eda1fab811
commit 500acc2444
19 files changed
+198 -201

No files matched your search

+11
View File
@@ -70,6 +70,16 @@ export default class Artplayer extends Emitter {
this.on('ready', () => readyCallback.call(this));
}
if (Artplayer.DEGUG) {
const log = (msg) => console.log(`[ART.${this.id}] -> ${msg}`);
log('Version@' + Artplayer.version);
log('Env@' + Artplayer.env);
log('Build@' + Artplayer.build);
for (let index = 0; index < config.events.length; index++) {
this.on('video:' + config.events[index], (event) => log('Event@' + event.type));
}
}
instances.push(this);
}
@@ -201,6 +211,7 @@ export default class Artplayer extends Emitter {
}
}
Artplayer.DEGUG = false;
Artplayer.NOTICE_TIME = 2000;
Artplayer.SETTING_WIDTH = 250;
Artplayer.SETTING_ITEM_WIDTH = 200;