兼容低内核版本的浏览器
This commit is contained in:
@@ -28,6 +28,12 @@ export function decodeCustomBase64(encoded: string): string {
|
||||
const index = ALPHABET_CUSTOM.indexOf(char);
|
||||
translated += index !== -1 ? ALPHABET_STANDARD.charAt(index) : char;
|
||||
}
|
||||
// Chrome 91 atob() is stricter than modern browsers.
|
||||
translated = translated.replace(/\s/g, "");
|
||||
const padNeeded = (4 - (translated.length % 4)) % 4;
|
||||
if (padNeeded > 0) {
|
||||
translated += "=".repeat(padNeeded);
|
||||
}
|
||||
const decoded = atob(translated);
|
||||
const bytes = new Uint8Array(decoded.length);
|
||||
for (let i = 0; i < decoded.length; i++) {
|
||||
@@ -168,7 +174,7 @@ export interface PeqApplyPayload {
|
||||
// ============================================================
|
||||
// Input/Output Labels
|
||||
// ============================================================
|
||||
export const INPUT_LABELS = ["USB", "USB-C", "Coaxial", "Optical", "Bluetooth", "IIS", "RCA"];
|
||||
export const INPUT_LABELS = ["USB", "USB-C", "Coaxial", "Optical", "Bluetooth", "HDMI-EARC", "RCA"];
|
||||
export const OUTPUT_LABELS = ["XLR", "RCA", "Headset", "XLR/RCA"];
|
||||
|
||||
/** Device `input` index for Bluetooth source. */
|
||||
|
||||
Reference in New Issue
Block a user