DjipAV
The DjipAV library provides objects to work with video and audio inputs in the browser. It is currently in early alpha and is definitely not production ready.
DjipAV uses the latest APIs (such as MediaDevices and ImageCapture) and will only work in a narrow subset of browsers. Since I'm using it in projects based on NW.js and Electron, this works fine for me.
Installing the library
The prefered way to install the library is by using NPM:
npm install djipav
Importing the library
The library is imported using JavaScript's module syntax:
;
Basic usage
Webcam
Here's an example of how to open a webcam and display the video feed via an automatically-created
<video>
tag:
; let cam = element: "create";camstart;
You can fetch available inputs in this way:
;djipav;
Microphone
Here's an example of how to open the first audio input and display its volume anytime it changes:
; let mic = ;mic;micstart;
API Reference
This library is documented via its API Reference.