filestack-js icon indicating copy to clipboard operation
filestack-js copied to clipboard

Filepicker webcam option freezes camera on iOS mobile Safari

Open Greeeeyyyss opened this issue 3 years ago • 0 comments

We are experiencing an issue when opening the webcam option of the file picker, the video/camera feed appears to be lagging when opened in Safari on iOS devices. It seems to be getting the first frame only and this is not happening on Google Chrome on Android and on PC web, and on Safari PC. The issue would be similar to this.

I'm not sure if the webcam option is using an html video element + getUserMedia() API but the possible fix would be to add these 3 properties:

<video ref={videoRef} autoPlay playsInline muted />

or play the video after the metadata is loaded:

videoRef.current.onloadedmetadata = () => {
     videoRef.current?.play();
};

Devices: iPhone 6, 6+ and iPhone SE. Attachment: FileStack picker issue video

Greeeeyyyss avatar Nov 04 '20 09:11 Greeeeyyyss