0

I'm trying to record a Mjpeg stream using Canvas on Chrome, I can perform without a problem, but on Firefox, I can record only the first frame. The browser doesn't change the reference according to the stream being played on the image tag.

I've tried to redraw every load and to get the image reference using react, I also tried to generate a new image for each frame, and although I'm facing some problems with the first calls getting NS_BINDING_ABORTED however, after being persistent it works. close question link

  • Try having **only the** `drawImage` **part** inside your own possible "update_mjpeg" function. From looking at code in the other question, the starting two lines should be put outside the function as a global setup. Put `getContext("2d")` [into a variable](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API#basic_example). Maybe these things will help you. It's also possible you might have to use a `captureStream` option on the `` tag to get its frames... – VC.One Aug 11 '23 at 10:02

0 Answers0