Skip to content

Commit 085fe19

Browse files
authored
fix: support added to allow recording on iOS Safari (#119)
* fix: fixed issue of unable to stop recording in case of safari 1. Added mimeType mp4 for Safari Browser Support 2. Bypassed function for fixMetaData in case of Safari * fix: updated to fix ios issue for video el Added playsInline attribute * fix: updated to stream once video element is created Added change to test in ios mobile * fix: updated the condition for ios mobile. Black screen appears when user tries to turn on camera * fix: logger added to debug issue in ios * fix: support added to allow recording on iOS Safari Changes: * we use window.MediaSource to check if inline recording is supported but that is not used anywhere in the code. * window.MediaSource is not supported in ios on safari as well * Updated the condition to check only if MediaRecorder and mediaDevices are supported to check for inline recording
1 parent 4f367cc commit 085fe19

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/video-recorder.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,15 +164,11 @@ export default class VideoRecorder extends Component {
164164

165165
componentDidMount () {
166166
const isInlineRecordingSupported =
167-
!!window.MediaSource && !!window.MediaRecorder && !!navigator.mediaDevices
167+
!!window.MediaRecorder && !!navigator.mediaDevices
168168

169169
const isVideoInputSupported =
170170
document.createElement('input').capture !== undefined
171171

172-
if (isInlineRecordingSupported) {
173-
this.mediaSource = new window.MediaSource()
174-
}
175-
176172
this.setState(
177173
{
178174
isInlineRecordingSupported,

0 commit comments

Comments
 (0)