const source = { uri: audioUrl } can't find my local file

Viewed 64

I use expo-av and want to use this:

const source = { uri: audioUrl }

When I try to add network URL, it works, but it can't find my local file.

// Don't work

{ uri: "./assets/040.wav" }

// Work

const source = { uri:"https://carolinegabriel.com/demo/jskeyboard/sounds/042.wav" }

// Work

require(`./assets/040.wav`)
0 Answers
Related