You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
user click start button and record video start but when countdown complete i call handleStop function for stop record
but onCapture not call fo send video to my service
this is my code =>
import Webcam from "react-webcam";
import {useRef, useState} from "react";
import React from "react"
import {blobToBase64} from "../tools/helpers";
import {useStreamManager} from "../tools/contexts/StreamManager";
import {BsCameraVideoOff} from "react-icons/bs";
import Spinner from "./Spinner";
import BottomButtonWrapper from "./BottomButtonWrapper";
import Button from "./Button";
import {BiChevronRight} from "react-icons/bi";
import {FaQuestionCircle} from "react-icons/fa";
import Countdown from "react-countdown";
The text was updated successfully, but these errors were encountered:
aligprr
changed the title
react-webcam not working in some device like this SM-A605G , SM-A605G
react-webcam not working in some device like this SM-A605G , M2102J20SG
Jun 13, 2024
user click start button and record video start but when countdown complete i call handleStop function for stop record
but onCapture not call fo send video to my service
this is my code =>
import Webcam from "react-webcam";
import {useRef, useState} from "react";
import React from "react"
import {blobToBase64} from "../tools/helpers";
import {useStreamManager} from "../tools/contexts/StreamManager";
import {BsCameraVideoOff} from "react-icons/bs";
import Spinner from "./Spinner";
import BottomButtonWrapper from "./BottomButtonWrapper";
import Button from "./Button";
import {BiChevronRight} from "react-icons/bi";
import {FaQuestionCircle} from "react-icons/fa";
import Countdown from "react-countdown";
const VideoCamera1 = ({max, title, handleShowGuid, hasBack, onBack, onCapture, webcamRef, faceMode = 'environment'}) => {
const {startStream} = useStreamManager();
const [start, setStart] = useState(false);
const clockRef = useRef();
const mediaRecorderRef = React.useRef(null);
const [recordedChunks, setRecordedChunks] = React.useState([]);
const [isLoading, setLoading] = useState(true);
const [cameraError, setCameraError] = useState(null);
const handleDownload = React.useCallback(() => {
if (recordedChunks.length) {
const blob = new Blob(recordedChunks, {
type: faceMode ? "video/mp4" : "video/webm"
});
blobToBase64(blob).then(res => {
onCapture(res);
const handleStop=()=>{
setStart(false)
clockRef.current.stop();
handleStopCaptureClick();
}
}
export default VideoCamera1
The text was updated successfully, but these errors were encountered: