添加log插件demo

This commit is contained in:
Harvey committed 2021-08-03 14:23:08 +08:00
1 parent 888c929549
commit e6242df6d3
4 files changed
+17 -1

No files matched your search

+6
View File
@@ -118,3 +118,9 @@ var art = new Artplayer({
state: '<img src="/assets/img/state.png">',
},
});
Artplayer.config.events.forEach(function (item) {
art.on('video:' + item, function (event) {
art.plugins.log.emit('video: ' + event.type);
});
});