Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aplayer-react

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aplayer-react - npm Package Compare versions

Comparing version 1.0.0-alpha.11 to 1.0.0-alpha.12

21

dist/index.js

@@ -742,13 +742,10 @@ "use strict";

// src/utils/getImageColor.ts
var import_colorthief = __toESM(require("@pioug/colorthief"));
var colorThiefSingleton;
var import_fast_average_color = require("fast-average-color");
var facSingleton;
function getImageColor(imageUrl) {
const colorThief = colorThiefSingleton ?? (colorThiefSingleton = new import_colorthief.default());
return new Promise((resolve) => {
const img = new Image();
img.onload = () => {
resolve(colorThief.getColor(img));
};
img.crossOrigin = "anonymous";
img.src = imageUrl;
const fac = facSingleton ?? (facSingleton = new import_fast_average_color.FastAverageColor());
return fac.getColorAsync(imageUrl, {
ignoredColor: [255, 255, 255, 255]
}).then((color) => {
return color.hex;
});

@@ -770,6 +767,6 @@ }

const coverUrl = song.cover;
getImageColor(coverUrl).then(([r, g, b]) => {
getImageColor(coverUrl).then((hex) => {
setCoverColorMap((prev) => ({
...prev,
[coverUrl]: `rgb(${r},${g},${b})`
[coverUrl]: hex
}));

@@ -776,0 +773,0 @@ });

{
"name": "aplayer-react",
"version": "1.0.0-alpha.11",
"version": "1.0.0-alpha.12",
"description": "The missing APlayer for React applications",

@@ -53,6 +53,6 @@ "publishConfig": {

"dependencies": {
"@pioug/colorthief": "^3.0.1",
"clsx": "^1.2.1",
"fast-average-color": "^9.3.0",
"use-sync-external-store": "^1.2.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc