Play Sound In React-js
I try to play a sound on react-js but I can't make it start. I have my sound var initialised in my reactClass, before get InitialState: var App = React.createClass({ audio: new Aud
Solution 1:
After trying for a while, I made 2 buttons, 1 to start the sound and one to stop, in my index.html file. So I tried that, and I noticed that it works from my file manager, but not if I try from the webpack server. So I checked my paths, and instead of: "files/audio.mp3" I changed it to "../files/audio.mp3". A rookie mistake, but that's what happens when you put a Android developer to work in javascript :)))
Post a Comment for "Play Sound In React-js"