Answer the question
In order to leave comments, you need to log in
How to get data from the canvas on which the frame from the video is drawn in Safari?
There is a task - to draw a frame from the video and get the data of a particular pixel.
To get data I use:
context.drawImage(video, 0, 0, width, height);
context.getImageData(10, 10, 1, 1);
getImageData(10, 10, 1, 1);
does not work if run in safari - throws an error access-control-allow-origin:*
Answer the question
In order to leave comments, you need to log in
The answer is this: at the moment it is impossible to parse a video in safari from a different domain. There is a defect in Safari on this topic, which will be fixed with the release of iOS 10. So the only way out is to generate a screenshot on the server and transfer it as an image.
Useful links describing the defect:
https://openradar.appspot.com/24641824
https://forums.developer.apple.com/message/113161#...
https://bugs.webkit.org/show_bug.cgi? id=135379
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question