0.2.12 • Published 4 years ago

djipav v0.2.12

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

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:

import * as djipav from "./node_modules/dist/djipav.esm.min.js";

Basic usage

Webcam

Here's an example of how to open a webcam and display the video feed via an automatically-created <video> tag:

import {VideoInput} from "./node_modules/dist/djipav.esm.min.js";

let cam = new VideoInput({element: "create"});
cam.start();

You can fetch available inputs in this way:

import * as djipav from "./node_modules/dist/djipav.esm.min.js";
djipav.getInputs().then(inputs => console.log(inputs));

Microphone

Here's an example of how to open the first audio input and display its volume anytime it changes:

import {AudioInput} from "./djipav.js";

let mic = new djipav.AudioInput();
mic.addListener("volume", e => console.log(e));
mic.start();

API Reference

This library is documented via its API Reference.

0.2.12

4 years ago

0.2.11

4 years ago

0.2.10

4 years ago

0.2.9

4 years ago

0.2.8

4 years ago

0.2.7

4 years ago

0.2.6

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago