react-record-webcam
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -300,3 +300,2 @@ import { useState, useEffect, useMemo, useCallback, createRef } from 'react'; | ||
} | ||
var isInit = false; | ||
function getDevices() { | ||
@@ -313,4 +312,3 @@ return __async(this, null, function* () { | ||
}; | ||
if (typeof window !== "undefined" && isInit === false) { | ||
isInit = true; | ||
if (typeof window !== "undefined") { | ||
const mediaDevices = yield getUserPermission(); | ||
@@ -460,2 +458,3 @@ devicesById = byId(mediaDevices); | ||
const url = URL.createObjectURL(blob); | ||
recording.blob = blob; | ||
recording.objectURL = url; | ||
@@ -716,3 +715,2 @@ if (recording.previewRef.current) { | ||
} | ||
var isInit2 = false; | ||
function useRecordWebcam({ | ||
@@ -761,9 +759,5 @@ mediaRecorderOptions, | ||
useEffect(() => { | ||
if (!isInit2) { | ||
isInit2 = true; | ||
init(); | ||
} | ||
init(); | ||
return () => { | ||
clearAllRecordings(); | ||
isInit2 = false; | ||
}; | ||
@@ -770,0 +764,0 @@ }, []); |
{ | ||
"name": "react-record-webcam", | ||
"description": "Webcam recording tool for React", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
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
50167
1052