react-record-webcam
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -55,3 +55,3 @@ import React from 'react'; | ||
recorderOptions: { | ||
type: "audio" | "video"; | ||
type: "video" | "audio"; | ||
mimeType: "video/mp4" | "audio/webm" | "video/webm;codecs=vp9" | "video/webm;codecs=vp8" | "video/webm;codecs=h264"; | ||
@@ -66,3 +66,3 @@ video: { | ||
} | { | ||
type: "audio" | "video"; | ||
type: "video" | "audio"; | ||
mimeType: "video/mp4" | "audio/webm" | "video/webm;codecs=vp9" | "video/webm;codecs=vp8" | "video/webm;codecs=h264"; | ||
@@ -69,0 +69,0 @@ video: { |
@@ -145,2 +145,3 @@ "use strict"; | ||
this.setState(__assign({}, initialState)); | ||
this.closeCamera(); | ||
}; | ||
@@ -222,3 +223,4 @@ RecordRtc.prototype.handleOpenCamera = function () { | ||
} | ||
this.setState(__assign(__assign({}, initialState), { isPreview: true, status: ((_a = this.props.statusMessages) === null || _a === void 0 ? void 0 : _a.PREVIEW) || types_1.CAMERA_STATUS.PREVIEW })); | ||
this.closeCamera(); | ||
this.setState(__assign(__assign({}, initialState), { isWebcamOn: false, isPreview: true, status: ((_a = this.props.statusMessages) === null || _a === void 0 ? void 0 : _a.PREVIEW) || types_1.CAMERA_STATUS.PREVIEW })); | ||
return [3 /*break*/, 4]; | ||
@@ -305,5 +307,5 @@ case 3: | ||
!this.state.isRecording && | ||
!this.state.isPreview, showCloseCamera: this.state.isWebcamOn, showStart: this.state.isWebcamOn || | ||
!this.state.isPreview || | ||
!this.state.isRecording, showStop: this.state.isRecording, showRetake: this.state.isPreview, showDownload: this.state.isPreview }))))); | ||
!this.state.isPreview, showCloseCamera: this.state.isWebcamOn, showStart: this.state.isWebcamOn && | ||
!this.state.isRecording && | ||
!this.state.isPreview, showStop: this.state.isRecording, showRetake: this.state.isPreview, showDownload: this.state.isPreview }))))); | ||
}; | ||
@@ -310,0 +312,0 @@ RecordRtc.defaultProps = { |
@@ -11,3 +11,3 @@ import React from 'react'; | ||
}; | ||
declare const Video: React.ForwardRefExoticComponent<Pick<VideoProps, "autoPlay" | "cssNamespace" | "muted" | "loop" | "style"> & React.RefAttributes<HTMLVideoElement>>; | ||
declare const Video: React.ForwardRefExoticComponent<Pick<VideoProps, "cssNamespace" | "style" | "autoPlay" | "muted" | "loop"> & React.RefAttributes<HTMLVideoElement>>; | ||
export default Video; |
{ | ||
"name": "react-record-webcam", | ||
"description": "A React webcam component 🎬📹", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
45932
656