Search code examples
javascripthtmlvideo.jsmjpeg

Include a MJPEG in a html-Site, using video.js


Here's my case: I get a Stream from a Web-Server. The format of this Stream is MJPEG. I embedded this stream in a html-site with the following code: <img src="http://172.17.52.161:9000/stream/video.mjpeg">, but I'd like to use a Player for this stream. Is there a possibility to use video.js with mjpeg-streams? My overall goal is to compile these files with Phonegap-Build, to use it on my Smartphone, is this possible? Thank you for your help!


Solution

  • You can use an <video> tag

    <video src="http://172.17.52.161:9000/stream/video.mjpeg" controls>
       Your browser does not support the <code>video</code> element.
    </video>