3 ms·
base64 encoded JPEGs MJPEG is supported in all browsers I know of, and would cut down on bandwidth by 33% over base64. (If you really want to use WebSockets,
by userbinator 12y ago
base64 encoded JPEGs
MJPEG is supported in all browsers I know of, and would cut down on bandwidth by 33% over base64.
(If you really want to use WebSockets, a more dense encoding than base64 could also help - look into base85, for example.)
- niutech 12y agoMJPEG is good, but keep in mind that Chrome doesn't support playback of MJPEG streams as a main resource, it has to be in an <img> tag.
- userbinator 12y agoLooks like that functionality used to be there, was broken, fixed, and then broken again sometime later. The latest bug for it appears to be https://code.google.com/p/chromium/issues/detail?id=308999 https://code.google.com/p/chromium/issues/detail?id=308999 For this application you'd need it to be in an <img> tag anyway since there's the other stuff on the page too, so that's a moot point.
- niutech 12y agoNot only <img>. The MJPEG stream could theoretically be embedded in an <iframe>, thus being affected by this bug.