Safari and Stream Video Content

  • Thread starter Thread starter MattC
  • Start date Start date
M

MattC

Hi,

I have the following code in the code behind for a page. I use it to
deliver a video without the user being able to view the direct address in
the media player properties. It works fine on IE and Firefox, but
Mac/Safari seems to not like the fact that the content-type is different
from teh file exptension type it has registered.

Any ideas how this can be circumvented?

TIA

MattC

private void Page_Load(object sender, System.EventArgs e)

{



string mode = Convert.ToString(Request.QueryString["mode"]);

if(mode == "deliver")

{

//get the filename and location

string filelocation = Server.MapPath("vid.wmv");


Response.Clear();

Response.ContentType = "video/x-ms-wmv";

Response.AddHeader("Content-disposition", "filename=vid.wmv");



FileStream fs = new FileStream(filelocation,FileMode.Open, FileAccess.Read);

BinaryReader br = new BinaryReader(fs);



Response.BinaryWrite(br.ReadBytes(Convert.ToInt32(fs.Length)));

Response.Flush();

}

}
 
safari mpeg4 video problem

Hi,


I'm in front of the same problem with safari and quicktime (mpeg 4 video files)

My aspx download page work fine : /Download/movie.aspx?MediaURL=/medias/STT_STVM00022_0.mp4 but only when i use application/octet-stream or video/mpeg but the movies is downloaded and opened in quicktime but doesn't want to open in the safari browser page.

Did you find any solution to the problem?

Thanks inadvance for the help.
 
Back
Top