GoogleChromeLabs/imagecapture-polyfill

Can't find variable: ImageCapture on Safari iOS 14

Opened this issue · 0 comments

Hello,

I've been trying to use ImageCapture-polyfill and everything works fine on Android.
On iOS I'm encountering this error:

Unhandled Promise Rejection: ReferenceError: Can't find variable: ImageCapture

This is my code where ImageCapture is called:

var handleSuccess = function(stream) {
        player.srcObject = stream;
        const track = stream.getVideoTracks()[0];
        track.applyConstraints({advanced : [{focusMode: "continuous"}]});
        const capabilities = track.getCapabilities();
        const settings = track.getSettings();
        let {width, height} = stream.getTracks()[0].getSettings();
        console.log(`${width}x${height}`); 
        console.log(capabilities)
        console.log(settings)
        imageCapture = new ImageCapture(track);
    };

I've tested on two iPhones:

  • iPhone SE 2020, Safari, iOS 14.4
  • iPhone X, Safari, iOS 14.3

Are there any suggestions available for a solution or workaround?
Thank you