this.img.decode is not a function
tong233 opened this issue · comments
Bug Report
Describe the Bug
Hi,
getting the error in Android:
this.img.decode is not a function
User Agent:
Mozilla/5.0 (Linux; U; Android 9; zh-CN; MZ-16s Pro Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/62.0.3202.97 MZBrowser/8.7.0 Mobile Safari/537.36
When I change another browser ,no error but get blank img
Quark browser User Agent:
Mozilla/5.0 (Linux; U; Android 9; zh-CN; 16s Pro Build/PKQ1.190616.001) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 Quark/3.8.5.129 Mobile Safari/537.36
Additional Information
console.log(window.IntersectionObserver) has value
thank you, error is gone. still have blank bug.
@tong233 Does it work well on Google Chrome? Sorry I don't have Android device, so I need your help for debugging.
@wellyshen Chrome 80 and Safari does work well, may be my browser with Chrome kernel version 57 is too low. Sorry you can ignore it. In addition, would you consider compatibility img.decode()? don't use it without support.
@tong233 I also think about it. But I'm not sure if the root cause is from img.decode()
or Image
API itself. Would you mind to help me figure it out (here's the related file).
@wellyshen I'm sure is img.decode() because console.log(img.decode) get undefined on chrome 62.Look at MDN chrome need higher than 64. I think just add if (decode && this.img.decode)
on line 26
This happens in Microsoft Edge browser as well. Setting decode: false works.
Thank you guys. This issue has been fixed via v1.0.17. However I'd recommend you to use the latest version.