Comparing version 1.2.1 to 1.2.2
@@ -39,2 +39,3 @@ (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; | ||
history = options.history || 10, | ||
audioContext = options.audioContext || null, | ||
running = true; | ||
@@ -71,6 +72,6 @@ | ||
harker.suspend = function() { | ||
audioContext.suspend(); | ||
return audioContext.suspend(); | ||
} | ||
harker.resume = function() { | ||
audioContext.resume(); | ||
return audioContext.resume(); | ||
} | ||
@@ -77,0 +78,0 @@ Object.defineProperty(harker, 'state', { get: function() { |
@@ -37,2 +37,3 @@ var WildEmitter = require('wildemitter'); | ||
history = options.history || 10, | ||
audioContext = options.audioContext || null, | ||
running = true; | ||
@@ -39,0 +40,0 @@ |
{ | ||
"name": "hark", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Converts an audio stream to speech events in the browser", | ||
@@ -5,0 +5,0 @@ "main": "hark.js", |
@@ -61,3 +61,3 @@ # Hark | ||
* The hark object also has the following methods to update the config of hark. Both of these options can be passed in on instantiation, but you may wish to alter them either for debug or fine tuning as your app runs. | ||
* `setInterval(interval_in_ms)` change | ||
* `setInterval(interval_in_ms)` change | ||
* `setThreshold(threshold_in_db)` change the minimum volume at which the audio will emit a `speaking` event | ||
@@ -72,2 +72,3 @@ * hark can be stopped by calling this method | ||
* `play` (optional, default true for audio tags, false for webrtc streams) whether the audio stream should also be piped to the speakers, or just swallowed by the analyser. Typically for audio tags you would want to hear them, but for microphone based webrtc streams you may not to avoid feedback. | ||
* `audioContext` (optional, default is to create a new context) If you have already created an `AudioContext`, you can pass it to hark to avoid unnecessarily creating more than one. | ||
@@ -87,3 +88,3 @@ ## Understanding dB/volume threshold | ||
## Requirements: | ||
* Chrome 27+, remote streams require Chrome 49+ | ||
@@ -90,0 +91,0 @@ * Firefox |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18265
387
95
0