react-video-preview
Advanced tools
Comparing version 1.0.8 to 1.0.9
@@ -45,2 +45,3 @@ 'use strict'; | ||
_this.stream = null; | ||
_this.audioContext = null; | ||
_this.state = { | ||
@@ -100,15 +101,13 @@ vuMeter: 0 | ||
}; | ||
if (selectedAudio) { | ||
if (selectedAudio !== 'none') { | ||
streamOptions['audio'] = {}; | ||
streamOptions['audio']['optional'] = [{ sourceId: selectedAudio }]; | ||
} | ||
if (selectedAudio == 'none') { | ||
} else { | ||
streamOptions['audio'] = false; | ||
} | ||
if (selectedVideo) { | ||
if (selectedVideo !== 'none') { | ||
streamOptions['video'] = {}; | ||
streamOptions['video']['optional'] = [{ sourceId: selectedVideo }]; | ||
} | ||
if (selectedVideo == 'none') { | ||
} else { | ||
streamOptions['video'] = false; | ||
@@ -120,2 +119,5 @@ } | ||
} | ||
if (_this2.audioContext) { | ||
_this2.audioContext.close(); | ||
} | ||
_this2.stream = stream; | ||
@@ -137,2 +139,3 @@ if (audio) { | ||
var audioContext = new AudioContext(); | ||
this.audioContext = audioContext; | ||
var analyser = audioContext.createAnalyser(); | ||
@@ -139,0 +142,0 @@ var microphone = audioContext.createMediaStreamSource(stream); |
{ | ||
"name": "react-video-preview", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Little video preview using webRTC", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
427599
8440