Socket
Book a DemoInstallSign in
Socket

audio-context-singleton

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

audio-context-singleton - npm Package Compare versions

Comparing version

to
1.1.2

10

index.js

@@ -40,13 +40,9 @@ /* global webkitAudioContext */

function passNewContext() {
var acOpts;
if (opts && opts.sampleRate) {
acOpts = { sampleRate: opts.sampleRate };
}
if (ctorOpts && ctorOpts.offline) {
audioContext = new OfflineAudioContext(acOpts);
audioContext = new OfflineAudioContext(opts);
} else {
if (typeof AudioContext === 'function') {
audioContext = new AudioContext(acOpts);
audioContext = new AudioContext(opts);
} else {
audioContext = new webkitAudioContext(acOpts);
audioContext = new webkitAudioContext(opts);
}

@@ -53,0 +49,0 @@ }

{
"name": "audio-context-singleton",
"version": "1.1.1",
"version": "1.1.2",
"description": "When you want to have an audioContext singleton but don't want to rewrite [this code](index.js), use this. Deals with browser differences in AudioContext and maintains the singleton.",

@@ -5,0 +5,0 @@ "main": "index.js",