This commit is contained in:
Harvey Zack committed 2019-04-18 18:08:50 +08:00
1 parent a2c3e0d019
commit 2d6ac77747
3 files changed
+3 -7

No files matched your search

@@ -92,9 +92,7 @@ function artplayerPluginBacklight(art) {
const dataUri = player.getScreenshotDataURL();
const $img = document.createElement('img');
$img.onload = () => {
const width = $img.naturalWidth;
const height = $img.naturalHeight;
const colors = getColors($img, width, height);
const colors = getColors($img, clientWidth, clientHeight);
colors.forEach(({ r, g, b }, index) => {
const { $box, left, right, top, bottom } = matrix[index];
// eslint-disable-next-line no-nested-ternary