Files
Monochrome-Android-APK/capacitor.config.ts
T
fabiodalez-dev 1caf8cb5b9 v2.3.0: Fix audio playback on fresh install
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
2026-04-22 20:01:15 +02:00

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;