Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

audio-oscilloscope

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-oscilloscope

Audio oscilloscope in canvas.

latest
Source
npmnpm
Version
0.0.6
Version published
Maintainers
1
Created
Source


logo


audio-oscilloscope

Audio oscilloscope in canvas.

License Build Status dependencies Status NPM version

NPM

Demo

https://lab.miguelmota.com/audio-oscilloscope

Install

npm install audio-oscilloscope

Usage

var oscilloscope = AudioOscilloscope(document.getElementById('canvas'), {
  canvas: {
    width: function() {
      return window.innerWidth;
    },
    height: 400
  },
  canvasContext: {
    lineWidth: 2,
    fillStyle: 'rgb(0,0,0)',
    strokeStyle: 'green'
  }
});

oscilloscope.draw();

navigator.mediaDevices.getUserMedia({
  audio: true
}).then(function(stream) {
  var audioContext = new AudioContext();
  var source = audioContext.createMediaStreamSource(stream);
  oscilloscope.addSource(source);
}).catch(function(error) {
  console.error(error);
});

License

MIT

Keywords

audio

FAQs

Package last updated on 23 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts