G
Guest
hi,
i am doing a proof of concept and trying to stream 2 objects to the browser
one is a pdf and another is a .3g2 video file. when i try to do the pdf it
works great and the pdf opens in the browser but when i do the video file it
just returns the gibrish from the byte[]. the vodeo is fine because when i
link to the video directly then quicktime opens in the browser and it starts
to play.
I checked anyway and the 3g2 extension is on the machine and associated with
quicktime.
i just cant understand why the browser dosent start the video then i stream
it. any ideas????
check out the code.
FileStream fs = new FileStream(@"c:\website1\test.3g2", FileMode.Open);
//FileStream fs = new FileStream(@"c:\website1\test.pdf", FileMode.Open);
byte[] b = new byte[fs.Length];
fs.Read(b, 0, (int)fs.Length);
fs.Close();
fs.Dispose();
Response.ContentType = "video/3g2";
//Response.ContentType = "text/pdf";
Response.BinaryWrite(b);
i am doing a proof of concept and trying to stream 2 objects to the browser
one is a pdf and another is a .3g2 video file. when i try to do the pdf it
works great and the pdf opens in the browser but when i do the video file it
just returns the gibrish from the byte[]. the vodeo is fine because when i
link to the video directly then quicktime opens in the browser and it starts
to play.
I checked anyway and the 3g2 extension is on the machine and associated with
quicktime.
i just cant understand why the browser dosent start the video then i stream
it. any ideas????
check out the code.
FileStream fs = new FileStream(@"c:\website1\test.3g2", FileMode.Open);
//FileStream fs = new FileStream(@"c:\website1\test.pdf", FileMode.Open);
byte[] b = new byte[fs.Length];
fs.Read(b, 0, (int)fs.Length);
fs.Close();
fs.Dispose();
Response.ContentType = "video/3g2";
//Response.ContentType = "text/pdf";
Response.BinaryWrite(b);