Issue
Im trying to save an audio in the new Firebase Storage option, the audio is set as a .mp3 file and the uploaded to Firebase via this code : UploadTask uploadAudio = storageRef.putFile(audioUri);
The problem is that the audio is stored as a video/mp4 file, and because of that the MediaPlayer does not reproduce it as an audio, how can I fix this?
Solution
Moving comment to answer:
You can explicitly specify metadata when you upload the file to Firebase. If you specify setContentType("audio/mpeg")
it should map the file to an MP3 correctly.
Answered By - Mike McDonald
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.