I'm developing an app with Electron and React, it's kind of mp3 player. The problem is that I want to play audios that are not in the project folder. How can I upload these files from my hard drive?
import React from 'react';
import Sound from 'react-sound';
class App extends React.Component {
render() {
return (
<Sound
url='/media/user/Vol/a.mp3'
playStatus={Sound.status.PLAYING}
playFromPosition={300}
onLoading={this.handleSongLoading}
onPlaying={this.handleSongPlaying}
onFinishedPlaying={this.handleSongFinishedPlaying}
/>
)
}
}
export default App;
I tried to set the url like file:///media/user/Vol/a.mp3
, but it doesn't work.