Fetch local audio file (file:///...) from within react-native-webview #1805
Patrick-Sawyer
started this conversation in
General
Replies: 2 comments
-
@Patrick-Sawyer have you figured this out? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm trying the exact same thing but am not able to fetch my audio file with the file:/// prefix. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to get an audio file (mp3, wav) as an audioBuffer in a react native app. Currently my approach is to use the web audio API within the react-native-webview component, and send data from there to the main react native app (ultimately to make an audio waveform). This works really well when I fetch an mp3 from a remote URL, but fails when I try to access a file on an android - e.g. file:///........
I am using the "injectedJavaScript" prop to inject the JavaScript below into my react-native-webview component.
Any help on this would be amazing, I have lost days to this. Tried react-native-audio-waveform but it is far too slow.
const injectedJavaScript = `
Beta Was this translation helpful? Give feedback.
All reactions