XamarinCommunityToolkit icon indicating copy to clipboard operation
XamarinCommunityToolkit copied to clipboard

[Bug] Audio files recorded on the device don't load or get played using Media Element on Android

Open sb111111111 opened this issue 3 years ago • 0 comments

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

audio file.zip

sb111111111 avatar Jul 28 '22 14:07 sb111111111