You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Up until recently, I was able to use the WellKnownMediaFormats.adtsAac to record audio that would be playable on both Android and iOS (after being uploaded to firebase). Recently, it seems audio recorded on Android has changed slightly in format. The filetype in firebase used to be just simply audio/aac for both android and iOS recordings/uploads. However, recently, when recordings are made with sounds on Android, the are show as audio/X-HX-AAC-ADTS which cannot be played on iOS. Was there a change made to Android's media encoders/formats? Or is there another solution that a file can be both recorded and played back on iOS and Android?
The text was updated successfully, but these errors were encountered:
I created a custom media format that seems to work saving the files as mp4's:
class CustomMediaFormat extends NativeMediaFormat {
/// ctor
const CustomMediaFormat({
int sampleRate = 16000,
int numChannels = 1,
int bitRate = 16000,
}) : super.detail(
name: 'aac',
sampleRate: 16000,
numChannels: 1,
bitRate: 16000,
);
@override
String get extension => 'aac';
// Whilst the actual index is MediaRecorder.AudioEncoder.AAC (3)
@override
int get androidEncoder => 3;
/// MediaRecorder.OutputFormat.MP4
@override
int get androidFormat => 2;
/// kAudioFormatMPEG4AAC
@override
int get iosFormat => 1633772320;
}
Up until recently, I was able to use the
WellKnownMediaFormats.adtsAac
to record audio that would be playable on both Android and iOS (after being uploaded to firebase). Recently, it seems audio recorded on Android has changed slightly in format. The filetype in firebase used to be just simplyaudio/aac
for both android and iOS recordings/uploads. However, recently, when recordings are made with sounds on Android, the are show asaudio/X-HX-AAC-ADTS
which cannot be played on iOS. Was there a change made to Android's media encoders/formats? Or is there another solution that a file can be both recorded and played back on iOS and Android?The text was updated successfully, but these errors were encountered: