diff --git a/package-lock.json b/package-lock.json index 8afe48d..3e78246 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,6 @@ "packages": { "": { "name": "@meowarex/TidalLuna-Plugins", - "dependencies": { - "pnpm": "^10.14.0" - }, "devDependencies": { "@types/node": "^22.15.29", "@types/react": "^19.1.6", @@ -1641,22 +1638,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/pnpm": { - "version": "10.14.0", - "resolved": "https://registry.npmjs.org/pnpm/-/pnpm-10.14.0.tgz", - "integrity": "sha512-rSenlkG0nD5IGhaoBbqnGBegS74Go40X5g4urug/ahRsamiBJfV5LkjdW6MOfaUqXNpMOZK5zPMz+c4iOvhHSA==", - "license": "MIT", - "bin": { - "pnpm": "bin/pnpm.cjs", - "pnpx": "bin/pnpx.cjs" - }, - "engines": { - "node": ">=18.12" - }, - "funding": { - "url": "https://opencollective.com/pnpm" - } - }, "node_modules/portfinder": { "version": "1.0.37", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.37.tgz", diff --git a/plugins/radiant-lyrics-luna/src/artwork.ts b/plugins/radiant-lyrics-luna/src/artwork.ts index e53cdb1..654c510 100644 --- a/plugins/radiant-lyrics-luna/src/artwork.ts +++ b/plugins/radiant-lyrics-luna/src/artwork.ts @@ -1,46 +1,217 @@ // MARKER: Animated Artwork (live artwork in the lyrics view) -// Renders the API HLS stream over TIDAL's static artwork tile. +// AnimatedArtworkLayer resolves the art for the playing track (bound to its +// track ID); each ArtworkSurface renders it over one of TIDAL's covers. // Orchestration (track change, visibility, settings) lives in index.ts. import { Tracer } from "@luna/core"; // Light build: no alt-audio/subtitles/EME needed here. Types in hls-light.d.ts. import Hls from "hls.js/light"; -import { artworkTitleKey, fetchAnimatedArtwork } from "./api"; +import { + type AnimatedArtwork, + artworkTitleKey, + fetchAnimatedArtwork, +} from "./api"; import { settings } from "./Settings"; const { trace } = Tracer("[Radiant Lyrics]"); export const ART_TILE_SELECTOR = '[data-test="now-playing-artwork"]'; +/** Player-bar thumbnail (same element the stock backdrop samples). */ +export const MINI_ART_SELECTOR = + '[data-test="footer-player"] [data-test="current-media-imagery"] img'; /** Elements that cannot render child nodes, so the video must go beside them. */ const REPLACED_TAGS = new Set(["IMG", "PICTURE", "VIDEO", "CANVAS", "SVG"]); // Keeps ABR off the 2160x2160 rung (91MB a loop). Bandwidth only, not CPU. const ART_MAX_DPR = 1; const ART_NATIVE_FPS = 25; +/** Matches the .rl-animated-art opacity transition. */ +const ART_FADE_MS = 300; -export class AnimatedArtworkLayer { +/** + * One