title: get data from thumb oximeter through microphone jack using javascript
body: <p>I have an old oximeter(the kind that attaches to your thumb).  I wanted to see if I could plug it in to the microphone jack on my PC and stream the data to an iFrame using the getUserMedia API.  </p>
  
  <p>here is the JS I have so far:</p>
  
  <pre><code>window.AudioContext = window.AudioContext ||
                    window.webkitAudioContext;
  
  const context = new AudioContext();
  
  navigator.mediaDevices.getUserMedia({audio: true}).
  then((stream) =&gt; {
      const microphone = context.createMediaStreamSource(stream);
      const filter = context.createBiquadFilter();
  
      microphone.connect(filter);
  
      var frame = createEle("iframe");//createEle is just create element function from my library
  
      frame.sandbox = "allow-scripts";
      updateFrame();
  
      function updateFrame(){
          setTimeout(function(){
              frame.srcdoc = filter.context.listener.value;//i want frame to display oximeter value and refresh every second
              console.log(filter.context.listener);
              updateFrame();
          },1000);
      }
      heartPage.append(frame);//heartPage is just a static element on my page
  });
  </code></pre>