title: How to play a audio file picked form a file picker in react native
body: <p>I have file picker pick audio file from local storage and , result of the file picker is as follows</p>
  
  <pre><code>size: 1057931
  name: "AUD-20190314-WA0019.m4a"
  type: "audio/mpeg"
  uri: "content://com.android.externalstorage.documents/document/primary%3AWhatsApp%2FMedia%2FWhatsApp%20Audio%2FAUD-20190314-WA0019.m4a" 
  </code></pre>
  
  <p>I am currently using react-native-sound for the playing the selected audio file from the picker</p>
  
  <pre><code>var whoosh = new Sound(audio, Sound.MAIN_BUNDLE, error =&gt; {
    if (error) {
      console.log('failed to load the sound', error);
      return;
    }
    // loaded successfully
    console.log(
      'duration in seconds: ' +
        whoosh.getDuration() +
        'number of channels: ' +
        whoosh.getNumberOfChannels(),
    );
  
    // Play the sound with an onEnd callback
    whoosh.play(success =&gt; {
      if (success) {
        console.log('successfully finished playing');
      } else {
        console.log('playback failed due to audio decoding errors');
      }
    });
  }
  </code></pre>
  
  <p><strong>(audio variable is the uri revived in file picker)</strong></p>
  
  <p>But this approach doesn't play the audio file instead of playing , it leaves me the error </p>
  
  <blockquote>
    <p>failed to load the sound {message: "resource not found", code: -1}</p>
  </blockquote>
  
  <p>What am I doing wrong, and how can I be able to play the audio file picked form the file picker? </p>