Safari and Stream Video Content

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();

}

}
 
D

dcorlier

Hi,


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

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

Did you find any solution to the problem?

Thanks inadvance for the help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top