Socket
Book a DemoInstallSign in
Socket

jw-audio

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

jw-audio

A class which controls and manages the audio context.

0.1.5
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

jw-audio

A class which controls and manages the audio context.

NPM version build status node version npm download

Demo

Install

NPM

Props

PropDescription
destinationthe destination node of the audio context.

Methods

MethodParametersDescription
createMediaSourceurl: stringcreates a media element source from a given url. The returned source node allows playback controls such as play, pause, set playback time, etc...
createBufferSourceurl: stringcreates a buffer source from a given url.
createLiveSourcecreates a live stream source by requesting user audio media.
createGaincreates a gain node.
createAnalysercreates an analyser node.
createOscillatorcreates an oscillator node.
getFrequencyDataanalyser: analyser nodegenerates an array of frequency data from a given analyser node.

Usage

import * as Audio from "jw-audio";

/** Retrieves the destination node from the audio context. */
let destination = Audio.destination;

/** Creates a media source from a url. */
let source = await Audio.createMediaSource("<url>");

/** Create an analyser node from the audio context. */
let analyser = Audio.createAnalyser();

/** Create an gain node from the audio context. */
let gain = Audio.createGain();

/** Create an live stream source node from the audio context. */
let liveSource = await Audio.createLiveSource();

/** Generates an array of frequency data from a given analyser node. */
let frequencyData = Audio.getFrequencyData(analyser);

Keywords

audio

FAQs

Package last updated on 15 Feb 2019

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.