3 ms·
Dealing with Canvas is painful. I recently ran into a weird image distortion issue on Samsung Internet Browser 12 (I guess it's based on the Chrome engine) when
by redshirtrob 6y ago
Dealing with Canvas is painful. I recently ran into a weird image distortion issue on Samsung Internet Browser 12 (I guess it's based on the Chrome engine) when drawing a video frame to a canvas context using `drawImage`.
Since you've made Canvas your focus, I'm curious if you've seen this or have any ideas. Here are a couple reports I found online.
This one shows exactly what I see (note: this is not my post), and I was able to "fix" it using the technique in the question. I'm not particularly happy with that solution so I'm still working to understand what's going on.
https://stackoverflow.com/questions/63911732/javascript-canvas-capture-screenshot-of-camera-issue-in-samsung-browser https://stackoverflow.com/questions/63911732/javascript-canv...
Here's another report that seems related, although there's no mention of interaction with the video element.
https://forum.playcanvas.com/t/samsung-internet-browser-canvas-resolution-wrong/12272 https://forum.playcanvas.com/t/samsung-internet-browser-canv...
- rikroots 6y agoI don't have an answer for you, except to say that getting <video> and <canvas> elements to play nicely with each other across all browsers and devices is pretty much guaranteed to damage your day, week, or even your month. My Google searching bought me to this posting about Samsung Internet's Video Assistant feature (Nov 2019). My gut feeling is that the Video Assistant is possibly getting in the way of your code executing as expected? https://www.xda-developers.com/samsung-internet-10-2-stable-brings-back-video-assistant-feature/ https://www.xda-developers.com/samsung-internet-10-2-stable-...
- redshirtrob 6y agoOne month is about right when you add it all up. Not fun. Thanks for the suggestion. I have only found this to be an issues with version 12 and on. I have examples from version 9 & 11 that work as expected (both before and after video assistant was introduced). And I'm able to reproduce the issue with the video assistant turned off. Of course, none of that is to say it's not related to the video assistant in some way. I just don't have evidence of that yet.