title: The Web MIDI API is not supported by your browser - Google Chrome on Mac - when code is run locally
body: <p>Folks,</p>
  
  <p>I am trying work on a simple Web MIDI app.</p>
  
  <p>I already looked up and found out that Google Chrome is the only browser that supports this. So, I installed this but I still get this. </p>
  
  <blockquote>
    <p>WebMidi could not be enabled Error: The Web MIDI API is not supported
    by your browser.
        at WebMidi.enable (webmidi.min.js:30)
        at script.js:430 (anonymous)  @   script.js:432 WebMidi.enable    @   webmidi.min.js:30 (anonymous)   @   script.js:430
    Promise.then (async)       (anonymous)    @   script.js:154</p>
  </blockquote>
  
  <p>Mac - 10.15.2
  Chrome - 79.0.3945.117</p>
  
  <p>According to this link - <a href="https://www.midi.org/17-the-mma/99-web-midi" rel="nofollow noreferrer">https://www.midi.org/17-the-mma/99-web-midi</a> , Chrome definitely has the support. </p>
  
  <p>Important Note - If I were run the code directly on codepen, it works just fine. So the browser is working. But when I try to run locally, I get the error. </p>
  
  <p><a href="https://codepen.io/teropa/pen/JLjXGK" rel="nofollow noreferrer">https://codepen.io/teropa/pen/JLjXGK</a></p>
  
  <pre><code>  WebMidi.enable(err =&gt; {
      if (err) {
        console.error('WebMidi could not be enabled', err);
        return;
      }
  </code></pre>
  
  <p>What am I missing here? is this a chrome issue or Mac issue or some permission issue. Or, is there is something specific I need to make the MIDI code run locally?</p>
  
  <p>I am using this server, <a href="https://www.npmjs.com/package/http-server" rel="nofollow noreferrer">https://www.npmjs.com/package/http-server</a>, to run the code locally. </p>
  
  <p>(I have looked at other questions but did not find anything that relates to Chrome on Mac)</p>