Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stream closing when computer sleeps (#67)
We use `<img>` tag to display MJPEG stream of simulator frames. It appears that after computer goes to sleep, connection between `<img>` and simulator server is dropped. This change periodically tries to check if `<img>` contents is decodable and if not, remounts the image to establish a new connection. Note: there's similar problem with Vite HMR server. It's easier to test this change by using production build. Ref: https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode Fixes #41.
- Loading branch information