iOS playback: allow the local proxy for downloaded songs; default the media URL to the Supabase audio bucket

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
metatroncubeswdev 2026-10-31 17:34:03 -04:00
parent ee8fe2bf42
commit d7d3a93bae
2 changed files with 9 additions and 2 deletions

View File

@ -58,6 +58,11 @@
</array> </array>
</dict> </dict>
</dict> </dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>UIBackgroundModes</key> <key>UIBackgroundModes</key>
<array> <array>
<string>audio</string> <string>audio</string>

View File

@ -4,8 +4,10 @@ abstract final class Env {
static const supabaseUrl = String.fromEnvironment('SUPABASE_URL'); static const supabaseUrl = String.fromEnvironment('SUPABASE_URL');
static const supabasePublishableKey = String.fromEnvironment('SUPABASE_PUBLISHABLE_KEY'); static const supabasePublishableKey = String.fromEnvironment('SUPABASE_PUBLISHABLE_KEY');
/// Public base URL of the R2 bucket (custom domain), e.g. https://media.nangakathai.app /// Public base URL of the audio files. Defaults to the Supabase "audio" storage bucket.
static const mediaBaseUrl = String.fromEnvironment('MEDIA_BASE_URL'); static const _mediaBaseUrl = String.fromEnvironment('MEDIA_BASE_URL');
static String get mediaBaseUrl =>
_mediaBaseUrl.isNotEmpty ? _mediaBaseUrl : '$supabaseUrl/storage/v1/object/public/audio';
static bool get hasSupabase => supabaseUrl.isNotEmpty && supabasePublishableKey.isNotEmpty; static bool get hasSupabase => supabaseUrl.isNotEmpty && supabasePublishableKey.isNotEmpty;
} }