Skip to content

Commit

Permalink
fix: only use video input if inline is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
fbaiodias committed Nov 30, 2018
1 parent 47ba5df commit 27bb051
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/video-recorder.js
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,10 @@ export default class VideoRecorder extends Component {
isReplayVideoMuted
} = this.state

const videoInput = isVideoInputSupported ? (
const shouldUseVideoInput =
!isInlineRecordingSupported && isVideoInputSupported

const videoInput = shouldUseVideoInput ? (
<input
ref={el => (this.videoInput = el)}
type='file'
Expand Down Expand Up @@ -480,7 +483,7 @@ export default class VideoRecorder extends Component {
)
}

if (isVideoInputSupported) {
if (shouldUseVideoInput) {
return renderVideoInputView({ videoInput })
}

Expand Down

0 comments on commit 27bb051

Please sign in to comment.