mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-23 13:51:20 -08:00
update
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user