Merge pull request #105 from meowarex/dev

Fixed Null Assertions & Freed !important
This commit is contained in:
Meow Meow
2026-04-03 23:38:20 +11:00
committed by GitHub
4 changed files with 12 additions and 16 deletions
+7 -7
View File
@@ -157,19 +157,19 @@ export const videoChanged = (): boolean => {
}; };
export const sample = (): AudioData | null => { export const sample = (): AudioData | null => {
if (!monoAnalyser || !monoByteFreq || !monoByteTime || !monoFloatFreq || !monoFloatTime || !leftFloatTime || !rightFloatTime) return null; const ctx = audioContext;
if (!ctx || !monoAnalyser || !monoByteFreq || !monoByteTime || !monoFloatFreq || !monoFloatTime || !leftFloatTime || !rightFloatTime || !leftAnalyser || !rightAnalyser) return null;
// Recover from suspended context (can happen after tab becomes inactive) if (ctx.state === "suspended") {
if (audioContext?.state === "suspended") { ctx.resume().catch(() => {});
audioContext.resume().catch(() => {});
} }
monoAnalyser.getByteFrequencyData(monoByteFreq); monoAnalyser.getByteFrequencyData(monoByteFreq);
monoAnalyser.getByteTimeDomainData(monoByteTime); monoAnalyser.getByteTimeDomainData(monoByteTime);
monoAnalyser.getFloatFrequencyData(monoFloatFreq); monoAnalyser.getFloatFrequencyData(monoFloatFreq);
monoAnalyser.getFloatTimeDomainData(monoFloatTime); monoAnalyser.getFloatTimeDomainData(monoFloatTime);
leftAnalyser!.getFloatTimeDomainData(leftFloatTime); leftAnalyser.getFloatTimeDomainData(leftFloatTime);
rightAnalyser!.getFloatTimeDomainData(rightFloatTime); rightAnalyser.getFloatTimeDomainData(rightFloatTime);
return { return {
byteFrequency: monoByteFreq, byteFrequency: monoByteFreq,
@@ -178,7 +178,7 @@ export const sample = (): AudioData | null => {
floatTimeDomain: monoFloatTime, floatTimeDomain: monoFloatTime,
leftTimeDomain: leftFloatTime, leftTimeDomain: leftFloatTime,
rightTimeDomain: rightFloatTime, rightTimeDomain: rightFloatTime,
sampleRate: audioContext!.sampleRate, sampleRate: ctx.sampleRate,
fftSize: monoAnalyser.fftSize, fftSize: monoAnalyser.fftSize,
binCount: monoAnalyser.frequencyBinCount, binCount: monoAnalyser.frequencyBinCount,
}; };
+1 -1
View File
@@ -411,7 +411,7 @@ export const Settings = () => {
{playerBarBlur && ( {playerBarBlur && (
<LunaNumberSetting <LunaNumberSetting
title="Player Bar Blur Amount" title="Player Bar Blur Amount"
desc="Adjust the backdrop blur intensity (0-100, default: 26)" desc="Adjust the backdrop blur intensity (0-100, default: 15)"
min={0} min={0}
max={100} max={100}
step={1} step={1}
+3 -7
View File
@@ -149,11 +149,7 @@ const applyPlayerBarTintToElement = (): void => {
); );
} else { } else {
footerPlayer.style.removeProperty("background-color"); footerPlayer.style.removeProperty("background-color");
footerPlayer.style.setProperty( footerPlayer.style.removeProperty("background");
"background",
"linear-gradient(rgba(60,60,60,0.35) 0%, rgba(60,60,60,0.35) 27%, rgba(61,61,61,0.35) 35%, rgba(62,62,62,0.35) 43.5%, rgba(63,63,63,0.35) 53%, rgba(65,65,65,0.35) 66%, rgba(67,67,67,0.35) 81%, rgba(70,70,70,0.35) 100%)",
"important",
);
} }
if (settings.playerBarBlur) { if (settings.playerBarBlur) {
footerPlayer.style.setProperty( footerPlayer.style.setProperty(
@@ -167,8 +163,8 @@ const applyPlayerBarTintToElement = (): void => {
"important", "important",
); );
} else { } else {
footerPlayer.style.setProperty("backdrop-filter", "none", "important"); footerPlayer.style.removeProperty("backdrop-filter");
footerPlayer.style.setProperty("-webkit-backdrop-filter", "none", "important"); footerPlayer.style.removeProperty("-webkit-backdrop-filter");
} }
if (settings.floatingPlayerBar) { if (settings.floatingPlayerBar) {
footerPlayer.style.setProperty( footerPlayer.style.setProperty(
+1 -1
View File
@@ -324,7 +324,7 @@ body.rl-integrated-seekbar .rl-seekbar-bar:hover [data-test="progress-bar"] [dat
/* MARKER: PATCHES (Random Fixes for Tidals Changes) */ /* MARKER: PATCHES (Random Fixes for Tidals Changes) */
/* These change allot so i gave them their own section */ /* These change a lot so I gave them their own section */
/* Remove max-width cap on now-playing content */ /* Remove max-width cap on now-playing content */
[class*="_contentInner"] { [class*="_contentInner"] {