mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-22 13:21:20 -08:00
修复配置全局变量bug
This commit is contained in:
1 parent
b74eabc73b
commit
3de25525c4
44 files changed
+2477
-672
No files matched your search
@@ -1,14 +1,15 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
(global = global || self, global['artplayer-plugin-playlist'] = factory());
|
||||
(global = global || self, global.artplayerPluginPlaylist = factory());
|
||||
}(this, function () { 'use strict';
|
||||
|
||||
function artplayerPluginPlaylist(art) {
|
||||
var _art$constructor$util = art.constructor.utils,
|
||||
append = _art$constructor$util.append,
|
||||
errorHandle = _art$constructor$util.errorHandle,
|
||||
sleep = _art$constructor$util.sleep;
|
||||
sleep = _art$constructor$util.sleep,
|
||||
inverseClass = _art$constructor$util.inverseClass;
|
||||
var player = art.player,
|
||||
proxy = art.events.proxy,
|
||||
_art$template = art.template,
|
||||
@@ -74,14 +75,10 @@
|
||||
var index = playlist.findIndex(function (item) {
|
||||
return item.url === $video.src;
|
||||
});
|
||||
var $children = Array.from($playlistInner.children);
|
||||
var $item = $children[index];
|
||||
var $item = Array.from($playlistInner.children)[index];
|
||||
|
||||
if (index !== -1 && $item) {
|
||||
$children.forEach(function (item) {
|
||||
return item.classList.remove('active');
|
||||
});
|
||||
$item.classList.add('active');
|
||||
inverseClass($item, 'active');
|
||||
}
|
||||
});
|
||||
return {
|
||||
@@ -113,8 +110,6 @@
|
||||
};
|
||||
}
|
||||
|
||||
window.artplayerPluginPlaylist = artplayerPluginPlaylist;
|
||||
|
||||
return artplayerPluginPlaylist;
|
||||
|
||||
}));
|
||||
|
||||
Reference in new issue
Block a user