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:
parent
ee8fe2bf42
commit
d7d3a93bae
@ -58,6 +58,11 @@
|
||||
</array>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsLocalNetworking</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
|
||||
@ -4,8 +4,10 @@ abstract final class Env {
|
||||
static const supabaseUrl = String.fromEnvironment('SUPABASE_URL');
|
||||
static const supabasePublishableKey = String.fromEnvironment('SUPABASE_PUBLISHABLE_KEY');
|
||||
|
||||
/// Public base URL of the R2 bucket (custom domain), e.g. https://media.nangakathai.app
|
||||
static const mediaBaseUrl = String.fromEnvironment('MEDIA_BASE_URL');
|
||||
/// Public base URL of the audio files. Defaults to the Supabase "audio" storage bucket.
|
||||
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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user