title: How to play a wav (loaded from a URL) in React/html5?
body: <p>I want to include an audio player that plays a wav file that is loaded from a URL in a React component. Although this should work straight forward with the HTML5 <code>&lt;audio&gt;</code> element, I cannot get it to play (I just see the control elements).</p>
  
  <p>I tried to play a .mp3 with the same code, which works. I checked in Chrome and Safari which are supposed to support .wav - it works in neither of them. I tried to replace the <code>&lt;audio&gt;</code> element with a <a href="https://www.npmjs.com/package/react-audio-player" rel="nofollow noreferrer">react-audio-player</a>, a react-player and a <a href="https://www.npmjs.com/package/react-sound-dkadrios" rel="nofollow noreferrer">react-sound</a> element - none of them works.
  When I open the URL, the sound is downloaded as an attachment. </p>
  
  <pre class="lang-js prettyprint-override"><code>    render() {
  
          const wavUrl = config.fileServer+this.props.values.id+".wav";
  
          return (
              &lt;audio controls&gt;
                  &lt;source src={wavUrl} type="audio/wav" /&gt;
                  Your browser does not support the audio element.
              &lt;/audio&gt;
          );
      }
  </code></pre>
  
  <p>I expect to see an audio controller that starts playing the sound when I press play. Instead, I see an audio controller that does nothing when I press play, and that claims that the audio file is 0 seconds long. I checked the URL - it is correct if I past it as URL in my browser directly.</p>