PaulKinlan/qrcode

Live camera view no longer working on iOS

Closed this issue · 3 comments

It appears that you're no longer able to use the live camera feed to detect codes on iOS devices – something to do with an update to the camera API maybe?

IMG_388DC15850A8-1

Tested on iPhone 7, X, Xs; Safari and Firefox.
All running iOS 12.

We fixed this by adding muted autoplay playsinline on the video element.

@Crisfole aren't those attributes already on the video element? https://github.com/PaulKinlan/qrcode/blob/production/app/index.html#L45

I've had some success by switching the getUserMedia API to use the navigator.MediaDevice object, but as the two don't adhere to the same interface it requires some deeper code changes.