From 27bb051b7bd458e5131a3401039cfd85294c38ba Mon Sep 17 00:00:00 2001 From: Francisco Baio Dias Date: Fri, 30 Nov 2018 17:29:02 +0100 Subject: [PATCH] fix: only use video input if inline is not supported --- src/video-recorder.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/video-recorder.js b/src/video-recorder.js index 2992637..fd220ef 100644 --- a/src/video-recorder.js +++ b/src/video-recorder.js @@ -451,7 +451,10 @@ export default class VideoRecorder extends Component { isReplayVideoMuted } = this.state - const videoInput = isVideoInputSupported ? ( + const shouldUseVideoInput = + !isInlineRecordingSupported && isVideoInputSupported + + const videoInput = shouldUseVideoInput ? ( (this.videoInput = el)} type='file' @@ -480,7 +483,7 @@ export default class VideoRecorder extends Component { ) } - if (isVideoInputSupported) { + if (shouldUseVideoInput) { return renderVideoInputView({ videoInput }) }