'How And Where Do Meditation Apps Store Their Audio Files?
I'm building a Flutter app that plays audio files. I have hundreds of audio files that are too large to store in the app. So, I want to host the files, then stream them to the device.
I'm using the just_audio package (https://pub.dev/packages/just_audio). I've tested my code using the following hosted audio file and it works... (https://www.learningcontainer.com/wp-content/uploads/2020/02/Kalimba.mp3)
However, when I try to play my own audio files from Google Storage it doesn't work. Google gives me a storage location that looks like this (gs://myappname.appspot.com/audio_file.WAV)
So I guess I have two questions.
Is it possible to stream audio files from Google Storage to an iOS or Android app? If so, what am I not doing right? Or should I be using another Google service for this?
If this is not possible, how do apps like Headspace or Calm host and then stream their audio files?
Any advice would be greatly appreciated.
In an attempt to be thorough, here are the rules for my google storage account...
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
// allow access for all users
allow read, write;
}
}
}
Solution 1:[1]
I solved this. I was using the wrong address in Google Storage.
Google Storage gives a "storage location" which is the gs:// address I was using. It also gives a download link that I missed.
By using the download link, I solved my problem.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Canadian |
