Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 16 breaks camera view #423

Closed
justanthonylee opened this issue Jun 7, 2022 · 4 comments
Closed

iOS 16 breaks camera view #423

justanthonylee opened this issue Jun 7, 2022 · 4 comments

Comments

@justanthonylee
Copy link

Looks like now that I have iOS 16 installed on stuff it wont scan, added a debug button that dumps a image on page of the canvas from Quagga.canvas.dom.image; and the content is just a black box, preview still works so looks like the JS can't capture the image stream.

I am playing around with custom capture of the video element and see what I can find.

@github-actions
Copy link

github-actions bot commented Jun 7, 2022

Thank you for filing an issue! Please be patient. :-)

@justanthonylee
Copy link
Author

justanthonylee commented Jun 7, 2022

I am writing to a image element by calling this to see the camera input, looks fine on non iOS 16 devices so looks like a video render bug it might be due to new changes or might just be a iOS bug so can keep an eye on this going forward and report if I notice it get fixed in any future Developer Beta.

var video = document.getElementsByTagName("VIDEO")[0];
var datauri=getScreenshot(video, 1);

function getScreenshot(videoEl, scale) {
      scale = scale || 1;
  
      const canvas = document.createElement("canvas");
      canvas.width = videoEl.clientWidth * scale;
      canvas.height = videoEl.clientHeight * scale;
      canvas.getContext('2d').drawImage(videoEl, 0, 0, canvas.width, canvas.height);
  
      return canvas.toDataURL();
  }

@justanthonylee
Copy link
Author

This is not a problem in the stable version of iOS and the new beta builds from what I can see.

@ericblade
Copy link
Owner

My apologies for not seeing this one before. Time since June has been really busy. I'm glad that Apple seems to have fixed the issue though :D :D Thanks for reporting back.

Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants