hyochan / react-native-audio-recorder-player

react-native native module for audio recorder and player.
MIT License
719 stars 215 forks source link

startPlayer audio not working on android with the received audio messages - getstream.io #507

Open amir-ibrahim opened 1 year ago

amir-ibrahim commented 1 year ago

startPlayer audio not working on android with the received audio messages - getstream.io

Version of react-native-audio-recorder-player 3.5.3

Version of React Native 0.68.5

Platforms you faced the error (Android)

the code : await audioRecorderPlayer.startPlayer(asset_url);

error: LOG startPlayer error=> [Error: Prepare failed.: status=0x1]

kbartolo commented 1 year ago

Same error here, Versions: React Native 0.71.3. react-native-audio-recorder-player": "^3.5.3"

My uri is: 'file:////data/user/0/com.inteligo.techmobile/cache/audio_message.m4a', and using below code to make it works

await startPlayer(uri, async ({status, data}) => { console.log('startPlayer status', data); });

However, I only receive these error logs:

Possible Unhandled Promise Rejection (id: 0): Error: Prepare failed.: status=0x1 Error: Prepare failed.: status=0x1 at Object.promiseMethodWrapper [as startPlayer] (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.inteligo.techmobile&modulesOnly=false&runModule=true:2104:36) at AudioRecorderPlayer. (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.inteligo.techmobile&modulesOnly=false&runModule=true:259797:40) at Generator.next () at asyncGeneratorStep (http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.inteligo.techmobile&modulesOnly=false&runModule=true:1173:26)

did anybody find a solution?