@ahanapediatrics/react-volume-meter
Advanced tools
Comparing version 4.0.2 to 4.1.0
@@ -5,2 +5,9 @@ # Changelog | ||
## [4.1.0](https://github.com/ohana-pediatrics/react-volume-meter/compare/v4.0.2...v4.1.0) (2020-01-02) | ||
### Features | ||
* 🎸 support undefined AudioContexts ([75bb6d7](https://github.com/ohana-pediatrics/react-volume-meter/commit/75bb6d77e19a690640807615661edd46f4d246e8)) | ||
### [4.0.2](https://github.com/ohana-pediatrics/react-volume-meter/compare/v4.0.1...v4.0.2) (2019-12-06) | ||
@@ -7,0 +14,0 @@ |
@@ -8,3 +8,3 @@ import { Optional } from "@ahanapediatrics/ahana-fp"; | ||
declare type Props = { | ||
audioContext: AudioContext; | ||
audioContext: AudioContext | undefined; | ||
src: Optional<MediaStreamAudioSourceNode>; | ||
@@ -11,0 +11,0 @@ width: number; |
@@ -1023,2 +1023,5 @@ module.exports = | ||
return src.map(s => { | ||
if (typeof audioContext === 'undefined') { | ||
return undefined; | ||
} | ||
const analyser = audioContext.createAnalyser(); | ||
@@ -1025,0 +1028,0 @@ s.connect(analyser); |
{ | ||
"name": "@ahanapediatrics/react-volume-meter", | ||
"version": "4.0.2", | ||
"version": "4.1.0", | ||
"description": "A volume meter React component", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
130374
1683