yugasun / qrcode-decoder

🤘Tool for decoding qrcode by image,video or camera.
https://yugasun.github.io/qrcode-decoder/
MIT License
97 stars 35 forks source link

iOS has allready set crossOrigin = 'Anonymous',still throw error 'the operation is insecure' #14

Closed dengpeida closed 3 years ago

dengpeida commented 3 years ago

at func decodeFromImage()

swap these two rows like this image

to fix this problem

image
dengpeida commented 3 years ago

在iOS端使用时,即使设置了crossOrigin,图片跨域依然报错,需要在给src赋值之前先set crossOrigin