remove some files

This commit is contained in:
Harvey committed 2021-11-30 09:53:59 +08:00
1 parent 9510eaf0b8
commit e97f514a9e
4 files changed
-164

No files matched your search

@@ -1,142 +0,0 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.artplayerPluginBacklight = factory());
}(this, (function () { 'use strict';
function matrixCallback(callback) {
var result = [];
var x = 10;
var y = 5;
for (var xIndex = 0; xIndex < x; xIndex += 1) {
for (var yIndex = 0; yIndex < y; yIndex += 1) {
if (xIndex === 0 || xIndex === x - 1 || yIndex === 0 || yIndex === y - 1) {
result.push(callback(xIndex, yIndex, x, y));
}
}
}
return result;
}
function getColors($canvas, $video, width, height) {
var ctx = $canvas.getContext('2d');
$canvas.width = width;
$canvas.height = height;
ctx.drawImage($video, 0, 0);
return matrixCallback(function (xIndex, yIndex, x, y) {
var itemW = width / x;
var itemH = height / y;
var itemX = xIndex * itemW;
var itemY = yIndex * itemH;
var _ctx$getImageData = ctx.getImageData(itemX, itemY, itemW, itemH),
data = _ctx$getImageData.data;
var r = 0;
var g = 0;
var b = 0;
for (var i = 0, l = data.length; i < l; i += 4) {
r += data[i];
g += data[i + 1];
b += data[i + 2];
}
r = Math.floor(r / (data.length / 4));
g = Math.floor(g / (data.length / 4));
b = Math.floor(b / (data.length / 4));
return {
r: r,
g: g,
b: b
};
});
}
function creatMatrix(parent) {
return matrixCallback(function (xIndex, yIndex, x, y) {
var $box = document.createElement('div');
$box.style.position = 'absolute';
$box.style.left = "".concat(xIndex * 100 / x, "%");
$box.style.top = "".concat(yIndex * 100 / y, "%");
$box.style.width = "".concat(100 / x, "%");
$box.style.height = "".concat(100 / y, "%");
$box.style.webkitBorderRadius = '50%';
$box.style.borderRadius = '50%';
$box.style.webkitTransition = 'all .2s ease';
$box.style.transition = 'all .2s ease';
parent.appendChild($box);
return {
$box: $box,
left: xIndex === 0,
right: xIndex === x - 1,
top: yIndex === 0,
bottom: yIndex === y - 1
};
});
}
function artplayerPluginBacklight(art) {
var setStyles = art.constructor.utils.setStyles;
var _art$template = art.template,
$player = _art$template.$player,
$video = _art$template.$video,
player = art.player;
var $backlight = document.createElement('div');
$backlight.classList.add('artplayer-backlight');
setStyles($backlight, {
position: 'absolute',
zIndex: 9,
left: 0,
top: 0,
right: 0,
bottom: 0,
width: '100%',
height: '100%'
});
var matrix = creatMatrix($backlight);
var $canvas = document.createElement('canvas');
$player.insertBefore($backlight, $video);
(function loop() {
setTimeout(function () {
if (player.playing) {
var clientWidth = $video.clientWidth,
clientHeight = $video.clientHeight;
var colors = getColors($canvas, $video, clientWidth, clientHeight);
colors.forEach(function (_ref, index) {
var r = _ref.r,
g = _ref.g,
b = _ref.b;
var _matrix$index = matrix[index],
$box = _matrix$index.$box,
left = _matrix$index.left,
right = _matrix$index.right,
top = _matrix$index.top,
bottom = _matrix$index.bottom; // eslint-disable-next-line no-nested-ternary
var x = left ? '-64px' : right ? '64px' : '0'; // eslint-disable-next-line no-nested-ternary
var y = top ? '-64px' : bottom ? '64px' : '0';
$box.style.webkitBoxShadow = "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ") ").concat(x, " ").concat(y, " 128px");
$box.style.boxShadow = "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ") ").concat(x, " ").concat(y, " 128px");
});
}
if (!art.isDestroy) {
loop();
}
}, 200);
})();
return {
name: 'artplayerPluginBacklight'
};
}
return artplayerPluginBacklight;
})));
//# sourceMappingURL=artplayer-plugin-backlight.js.map
@@ -1 +0,0 @@
{"version":3,"file":"artplayer-plugin-backlight.js","sources":["../../packages/artplayer-plugin-backlight/src/index.js"],"sourcesContent":["function matrixCallback(callback) {\n const result = [];\n const x = 10;\n const y = 5;\n for (let xIndex = 0; xIndex < x; xIndex += 1) {\n for (let yIndex = 0; yIndex < y; yIndex += 1) {\n if (xIndex === 0 || xIndex === x - 1 || yIndex === 0 || yIndex === y - 1) {\n result.push(callback(xIndex, yIndex, x, y));\n }\n }\n }\n return result;\n}\n\nfunction getColors($canvas, $video, width, height) {\n const ctx = $canvas.getContext('2d');\n $canvas.width = width;\n $canvas.height = height;\n ctx.drawImage($video, 0, 0);\n return matrixCallback((xIndex, yIndex, x, y) => {\n const itemW = width / x;\n const itemH = height / y;\n const itemX = xIndex * itemW;\n const itemY = yIndex * itemH;\n const { data } = ctx.getImageData(itemX, itemY, itemW, itemH);\n let r = 0;\n let g = 0;\n let b = 0;\n for (let i = 0, l = data.length; i < l; i += 4) {\n r += data[i];\n g += data[i + 1];\n b += data[i + 2];\n }\n r = Math.floor(r / (data.length / 4));\n g = Math.floor(g / (data.length / 4));\n b = Math.floor(b / (data.length / 4));\n return { r, g, b };\n });\n}\n\nfunction creatMatrix(parent) {\n return matrixCallback((xIndex, yIndex, x, y) => {\n const $box = document.createElement('div');\n $box.style.position = 'absolute';\n $box.style.left = `${(xIndex * 100) / x}%`;\n $box.style.top = `${(yIndex * 100) / y}%`;\n $box.style.width = `${100 / x}%`;\n $box.style.height = `${100 / y}%`;\n $box.style.webkitBorderRadius = '50%';\n $box.style.borderRadius = '50%';\n $box.style.webkitTransition = 'all .2s ease';\n $box.style.transition = 'all .2s ease';\n parent.appendChild($box);\n return {\n $box,\n left: xIndex === 0,\n right: xIndex === x - 1,\n top: yIndex === 0,\n bottom: yIndex === y - 1,\n };\n });\n}\n\nfunction artplayerPluginBacklight(art) {\n const { setStyles } = art.constructor.utils;\n const {\n template: { $player, $video },\n player,\n } = art;\n\n const $backlight = document.createElement('div');\n $backlight.classList.add('artplayer-backlight');\n setStyles($backlight, {\n position: 'absolute',\n zIndex: 9,\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n width: '100%',\n height: '100%',\n });\n\n const matrix = creatMatrix($backlight);\n const $canvas = document.createElement('canvas');\n $player.insertBefore($backlight, $video);\n\n (function loop() {\n setTimeout(() => {\n if (player.playing) {\n const { clientWidth, clientHeight } = $video;\n const colors = getColors($canvas, $video, clientWidth, clientHeight);\n colors.forEach(({ r, g, b }, index) => {\n const { $box, left, right, top, bottom } = matrix[index];\n // eslint-disable-next-line no-nested-ternary\n const x = left ? '-64px' : right ? '64px' : '0';\n // eslint-disable-next-line no-nested-ternary\n const y = top ? '-64px' : bottom ? '64px' : '0';\n $box.style.webkitBoxShadow = `rgb(${r}, ${g}, ${b}) ${x} ${y} 128px`;\n $box.style.boxShadow = `rgb(${r}, ${g}, ${b}) ${x} ${y} 128px`;\n });\n }\n\n if (!art.isDestroy) {\n loop();\n }\n }, 200);\n })();\n\n return {\n name: 'artplayerPluginBacklight',\n };\n}\n\nexport default artplayerPluginBacklight;\n"],"names":["matrixCallback","callback","result","x","y","xIndex","yIndex","push","getColors","$canvas","$video","width","height","ctx","getContext","drawImage","itemW","itemH","itemX","itemY","getImageData","data","r","g","b","i","l","length","Math","floor","creatMatrix","parent","$box","document","createElement","style","position","left","top","webkitBorderRadius","borderRadius","webkitTransition","transition","appendChild","right","bottom","artplayerPluginBacklight","art","setStyles","constructor","utils","template","$player","player","$backlight","classList","add","zIndex","matrix","insertBefore","loop","setTimeout","playing","clientWidth","clientHeight","colors","forEach","index","webkitBoxShadow","boxShadow","isDestroy","name"],"mappings":";;;;;;IAAA,SAASA,cAAT,CAAwBC,QAAxB,EAAkC;IAC9B,MAAMC,MAAM,GAAG,EAAf;IACA,MAAMC,CAAC,GAAG,EAAV;IACA,MAAMC,CAAC,GAAG,CAAV;;IACA,OAAK,IAAIC,MAAM,GAAG,CAAlB,EAAqBA,MAAM,GAAGF,CAA9B,EAAiCE,MAAM,IAAI,CAA3C,EAA8C;IAC1C,SAAK,IAAIC,MAAM,GAAG,CAAlB,EAAqBA,MAAM,GAAGF,CAA9B,EAAiCE,MAAM,IAALine truncated
-20
View File
@@ -1,20 +0,0 @@
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.ArtplayerToolGithub = factory());
}(this, (function () { 'use strict';
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
}
var issuesDanmuku = createCommonjsModule(function (module, exports) {
!function(t,e){module.exports=e();}(commonjsGlobal,function(){var o=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};var i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(t){o(e,t,r[t]);});}return e};var t,a=(function(t){var e=function(i){var u,t=Object.prototype,s=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},o=e.iterator||"@@iterator",r=e.asyncIterator||"@@asyncIterator",n=e.toStringTag||"@@toStringTag";function a(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(i,a,c){var u=f;return function(t,e){if(u===p)throw new Error("Generator is already running");if(u===y){if("throw"===t)throw e;return S()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=O(r,c);if(n){if(n===d)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(u===f)throw u=y,c.arg;c.dispatchException(c.arg);}else"return"===c.method&&c.abrupt("return",c.arg);u=p;var o=h(i,a,c);if("normal"===o.type){if(u=c.done?y:l,o.arg===d)continue;return {value:o.arg,done:c.done}}"throw"===o.type&&(u=y,c.method="throw",c.arg=o.arg);}}}(t,r,a),i}function h(t,e,r){try{return {type:"normal",arg:t.call(e,r)}}catch(t){return {type:"throw",arg:t}}}i.wrap=a;var f="suspendedStart",l="suspendedYield",p="executing",y="completed",d={};function c(){}function g(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==t&&s.call(b,o)&&(m=b);var k=v.prototype=c.prototype=Object.create(m);function x(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)};});}function L(u){var e;this._invoke=function(r,n){function t(){return new Promise(function(t,e){!function e(t,r,n,o){var i=h(u[t],u,r);if("throw"!==i.type){var a=i.arg,c=a.value;return c&&"object"==typeof c&&s.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,n,o);},function(t){e("throw",t,n,o);}):Promise.resolve(c).then(function(t){a.value=t,n(a);},function(t){return e("throw",t,n,o)})}o(i.arg);}(r,n,t,e);})}return e=e?e.then(t,t):t()};}function O(t,e){var r=t.iterator[e.method];if(r===u){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=u,O(t,e),"throw"===e.method))return d;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method");}return d}var n=h(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=u),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0);}function P(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t};return n.next=n}}return {next:S}}function S(){return {value:u,done:!0}}return g.prototype=k.constructor=v,v.constructor=g,v[n]=g.displayName="GeneratorFunction",i.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return !!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,n in t||(t[n]="GeneratorFunction")),t.prototype=Object.create(k),t},i.awrap=function(t){return {__await:t}},x(L.prototype),L.prototype[r]=function(){return this},i.AsyncIterator=L,i.async=function(t,e,r,n){var o=new L(a(t,e,r,n));return i.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(k),k[n]="Generator",k[o]=function(){return this},k.toString=function(){return "[object Generator]"},i.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},i.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=u);},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var n=this;function Line truncated
});
return issuesDanmuku;
})));
//# sourceMappingURL=artplayer-tool-github.js.map
@@ -1 +0,0 @@
{"version":3,"file":"artplayer-tool-github.js","sources":["../../packages/artplayer-tool-github/node_modules/issues-danmuku/dist/issuesDanmuku.js"],"sourcesContent":["!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=t||self).IssuesDanmuku=e()}(this,function(){\"use strict\";var o=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};var i=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);\"function\"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(t){o(e,t,r[t])})}return e};var t,a=(function(t){var e=function(i){var u,t=Object.prototype,s=t.hasOwnProperty,e=\"function\"==typeof Symbol?Symbol:{},o=e.iterator||\"@@iterator\",r=e.asyncIterator||\"@@asyncIterator\",n=e.toStringTag||\"@@toStringTag\";function a(t,e,r,n){var o=e&&e.prototype instanceof c?e:c,i=Object.create(o.prototype),a=new j(n||[]);return i._invoke=function(i,a,c){var u=f;return function(t,e){if(u===p)throw new Error(\"Generator is already running\");if(u===y){if(\"throw\"===t)throw e;return S()}for(c.method=t,c.arg=e;;){var r=c.delegate;if(r){var n=O(r,c);if(n){if(n===d)continue;return n}}if(\"next\"===c.method)c.sent=c._sent=c.arg;else if(\"throw\"===c.method){if(u===f)throw u=y,c.arg;c.dispatchException(c.arg)}else\"return\"===c.method&&c.abrupt(\"return\",c.arg);u=p;var o=h(i,a,c);if(\"normal\"===o.type){if(u=c.done?y:l,o.arg===d)continue;return{value:o.arg,done:c.done}}\"throw\"===o.type&&(u=y,c.method=\"throw\",c.arg=o.arg)}}}(t,r,a),i}function h(t,e,r){try{return{type:\"normal\",arg:t.call(e,r)}}catch(t){return{type:\"throw\",arg:t}}}i.wrap=a;var f=\"suspendedStart\",l=\"suspendedYield\",p=\"executing\",y=\"completed\",d={};function c(){}function g(){}function v(){}var m={};m[o]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(P([])));b&&b!==t&&s.call(b,o)&&(m=b);var k=v.prototype=c.prototype=Object.create(m);function x(t){[\"next\",\"throw\",\"return\"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function L(u){var e;this._invoke=function(r,n){function t(){return new Promise(function(t,e){!function e(t,r,n,o){var i=h(u[t],u,r);if(\"throw\"!==i.type){var a=i.arg,c=a.value;return c&&\"object\"==typeof c&&s.call(c,\"__await\")?Promise.resolve(c.__await).then(function(t){e(\"next\",t,n,o)},function(t){e(\"throw\",t,n,o)}):Promise.resolve(c).then(function(t){a.value=t,n(a)},function(t){return e(\"throw\",t,n,o)})}o(i.arg)}(r,n,t,e)})}return e=e?e.then(t,t):t()}}function O(t,e){var r=t.iterator[e.method];if(r===u){if(e.delegate=null,\"throw\"===e.method){if(t.iterator.return&&(e.method=\"return\",e.arg=u,O(t,e),\"throw\"===e.method))return d;e.method=\"throw\",e.arg=new TypeError(\"The iterator does not provide a 'throw' method\")}return d}var n=h(r,t.iterator,e.arg);if(\"throw\"===n.type)return e.method=\"throw\",e.arg=n.arg,e.delegate=null,d;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,\"return\"!==e.method&&(e.method=\"next\",e.arg=u),e.delegate=null,d):o:(e.method=\"throw\",e.arg=new TypeError(\"iterator result is not an object\"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type=\"normal\",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:\"root\"}],t.forEach(_,this),this.reset(!0)}function P(e){if(e){var t=e[o];if(t)return t.call(e);if(\"function\"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=u,t.done=!0,t};return n.next=n}}return{next:S}}function S(){return{value:u,done:!0}}return g.prototype=k.constructor=v,v.constructor=g,v[n]=g.displayName=\"GeneratorFunction\",i.isGeneratorFunction=function(t){var e=\"function\"==typeof t&&t.constructor;return!!e&&(e===g||\"GeneratorFunction\"===(e.displayName||e.name))},i.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,n in t||(t[n]=\"GeneratorFunction\")),t.prototype=Object.create(k),t},i.awrap=function(t){return{__await:t}},x(L.prototype),L.prototype[r]=function(){return this},i.AsyncIterator=L,i.async=function(t,e,r,n){var o=new L(a(t,e,r,n));return i.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(k),k[n]=\"Generator\",k[o]=function(){return this},k.toString=function(){return\"[object Generator]\"},i.keys=function(r){var n=[];for(var t in r)n.push(t);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},i.values=P,j.prototype={constructor:j,reset:function(t){if(this.prev=0,this.next=0,this.senLine truncated