XamarinCommunityToolkit
XamarinCommunityToolkit copied to clipboard
[Bug] Audio files recorded on the device don't load or get played using Media Element on Android
Description
Recorded an audio file on the device using the Plugin.AudioRecorder. When trying to play it back it works on iOS but not on Android.
Steps to Reproduce
private readonly AudioRecorderService audioRecorderService = new AudioRecorderService() { StopRecordingOnSilence = false, StopRecordingAfterTimeout = false, };
Record:
var recordTask = await audioRecorderService.StartRecording();
Stop Recording:
await audioRecorderService.StopRecording(); var filePath = audioRecorderService.GetAudioFilePath();
Set the Media Element source to filePath and it doesn't play on Android. If I upload the file to a server and then set the source to the URL, still doesn't play on Android. But works fine on iOS. Also plays in Chrome on Android if navigating directly to the URL
Have attached the file here