mirror of
https://github.com/fabiodalez-dev/Monochrome-Android-APK.git
synced 2026-10-18 23:07:33 -05:00
Root cause: Capacitor WebView used Origin: https://localhost, which Tidal API proxies and CDN reject with 403. Changed the WebView hostname to monochrome.tf so the Origin matches what the upstream infrastructure expects. Changes: - capacitor.config.ts: server.hostname = monochrome.tf (was localhost) - TidalWebViewClient.java: intercepts Tidal CDN audio requests and re-sends with Origin: https://listen.tidal.com (same as the Chrome extension "Monochrome Tidal Bypass") - android-service.js: sets window.__tidalOriginExtension = true so upstream proxy-utils.js uses direct CDN URLs instead of the broken audio-proxy.binimum.org - fm-logger.js: blocks SW registration before any other script loads - build-android.sh: forces shouldTryNative=true for streaming so HiFiClient is tried before proxy instances, adds frankfurt-2 to streaming fallback, enriches search albums from track data
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import type { CapacitorConfig } from '@capacitor/cli';
|
|
|
|
const config: CapacitorConfig = {
|
|
appId: 'com.monochrome.app',
|
|
appName: 'Fabiodalez Music',
|
|
webDir: 'dist',
|
|
// Use monochrome.tf as the WebView origin so that Tidal API proxies
|
|
// and CDN accept our requests (they reject Origin: https://localhost).
|
|
server: {
|
|
hostname: 'monochrome.tf',
|
|
androidScheme: 'https',
|
|
},
|
|
android: {
|
|
adjustMarginsForEdgeToEdge: 'auto',
|
|
allowMixedContent: false,
|
|
},
|
|
plugins: {
|
|
SystemBars: {
|
|
insetsHandling: 'css',
|
|
style: 'DARK',
|
|
hidden: false,
|
|
statusBarColor: '#1a1a1a',
|
|
overlaysWebView: false,
|
|
},
|
|
// #39: SplashScreen config — no more white flash on launch
|
|
SplashScreen: {
|
|
launchShowDuration: 1500,
|
|
launchAutoHide: true,
|
|
launchFadeOutDuration: 300,
|
|
backgroundColor: '#000000',
|
|
androidScaleType: 'CENTER_CROP',
|
|
showSpinner: false,
|
|
splashFullScreen: true,
|
|
splashImmersive: false,
|
|
},
|
|
},
|
|
};
|
|
|
|
export default config;
|