0

I am trying to use an very simple expo audio player from this repo the player works fine with audio files imported as

import AudioFile from '../assets/test.m4a';

console.log of AudioFile returns a number

console.log(typeof AudioFile);

but when i try to use a file uri that i receive from a recorder i get a uri for the file as follows and the player does not work

file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540madaher%252Fdelivery/Audio/recording-091d5e42-1a82-4e59-8e76-d415ca424c29.m4a

Can someone help me understand the difference?

Mohamed Daher
  • 609
  • 1
  • 10
  • 23

1 Answers1

0

I solved this by changing await this.soundObject.loadAsync({ uri: this.props.audio }); instead of await this.soundObject.loadAsync(this.props.audio); Hope this helps somebody

Mohamed Daher
  • 609
  • 1
  • 10
  • 23