mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-21 12:41:20 -08:00
add Artplayer.DEGUG
This commit is contained in:
1 parent
eda1fab811
commit
500acc2444
19 files changed
+198
-201
No files matched your search
+2
-21
@@ -44,6 +44,8 @@
|
||||
<script src="./uncompiled/artplayer-plugin-danmuku/index.js"></script>
|
||||
<script src="./uncompiled/artplayer-plugin-ads/index.js"></script>
|
||||
<script>
|
||||
Artplayer.DEGUG = true;
|
||||
|
||||
var art = new Artplayer({
|
||||
container: '.artplayer-app',
|
||||
url: '/assets/sample/video.mp4',
|
||||
@@ -163,27 +165,6 @@
|
||||
}),
|
||||
],
|
||||
});
|
||||
|
||||
Artplayer.config.events.forEach(function (item) {
|
||||
art.on('video:' + item, function (event) {
|
||||
console.log('video: ' + event.type);
|
||||
});
|
||||
});
|
||||
|
||||
function formatDate(date) {
|
||||
var date = new Date(Number(date));
|
||||
var YY = date.getFullYear() + '-';
|
||||
var MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
|
||||
var DD = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
|
||||
var hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
|
||||
var mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
|
||||
var ss = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
|
||||
return YY + MM + DD + ' ' + hh + mm + ss;
|
||||
}
|
||||
|
||||
console.debug('Artplayer@' + Artplayer.version);
|
||||
console.debug('Env@' + Artplayer.env);
|
||||
console.debug('Build@' + formatDate(Artplayer.build));
|
||||
</script>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in new issue
Block a user