HttpWebResponse with MJPEG and multipart/x-mixed-replace; boundary=--myboundary response content typ
Posted
by arri.me
on Stack Overflow
See other posts from Stack Overflow
or by arri.me
Published on 2010-01-13T22:59:23Z
Indexed on
2010/05/14
7:54 UTC
Read the original article
Hit count: 816
I have an ASP.NET application that I need to show a video feed from a security camera. The video feed has a content type of 'multipart/x-mixed-replace; boundary=--myboundary' with the image data between the boundaries. I need assistance with passing that stream of data through to my page so that the client side plugin I have can consume the stream just as it would if I browsed to the camera's web interface directly. The following code does not work:
//Get response data
byte[] data = HtmlParser.GetByteArrayFromStream(response.GetResponseStream());
if (data != null)
{
HttpContext.Current.Response.OutputStream.Write(data, 0, data.Length);
}
return;
© Stack Overflow or respective owner