Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hark

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hark - npm Package Compare versions

Comparing version 1.1.6 to 1.2.0

20

hark.bundle.js

@@ -19,3 +19,6 @@ (function(e){if("function"==typeof bootstrap)bootstrap("hark",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeHark=e}else"undefined"!=typeof window?window.hark=e():global.hark=e()})(function(){var define,ses,bootstrap,module,exports;

var audioContextType = window.AudioContext || window.webkitAudioContext;
var audioContextType;
if (typeof window !== 'undefined') {
audioContextType = window.AudioContext || window.webkitAudioContext;
}
// use a single audio context due to hardware limits

@@ -48,3 +51,3 @@ var audioContext = null;

analyser.smoothingTimeConstant = smoothing;
fftBins = new Float32Array(analyser.fftSize);
fftBins = new Float32Array(analyser.frequencyBinCount);

@@ -68,2 +71,15 @@ if (stream.jquery) stream = stream[0];

harker.suspend = function() {
audioContext.suspend();
}
harker.resume = function() {
audioContext.resume();
}
Object.defineProperty(harker, 'state', { get: function() {
return audioContext.state;
}});
audioContext.onstatechange = function() {
harker.emit('state_change', audioContext.state);
}
harker.setThreshold = function(t) {

@@ -70,0 +86,0 @@ threshold = t;

@@ -67,2 +67,15 @@ var WildEmitter = require('wildemitter');

harker.suspend = function() {
audioContext.suspend();
}
harker.resume = function() {
audioContext.resume();
}
Object.defineProperty(harker, 'state', { get: function() {
return audioContext.state;
}});
audioContext.onstatechange = function() {
harker.emit('state_change', audioContext.state);
}
harker.setThreshold = function(t) {

@@ -69,0 +82,0 @@ threshold = t;

2

package.json
{
"name": "hark",
"version": "1.1.6",
"version": "1.2.0",
"description": "Converts an audio stream to speech events in the browser",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc