Re: Embed WMP Having SRC Point To ASPX Page
- From: "Neil Smith [MVP Digital Media]" <neil@xxxxxxxxxx>
- Date: Wed, 10 Jan 2007 23:15:44 GMT
But you're *not* sending an attachment there (in that case you'd need
a content-length header too for it to work). Drop the header for
content-disposition. What happens now ?
Is this problem reproducible on other machines, or have you only
tested on one machine so far ? Does it work on your home PC ?
Cheers - Neil
On Wed, 10 Jan 2007 14:19:01 -0800, Ross Nornes
<RossNornes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Sorry, I should have noted that upfront, but the ASPX page does set headers------------------------------------------------
for both the file content disposition and the content type as follows:
Response.AddHeader("Content-Disposition", "attachment; filename=" &
oFile.Name)
Response.ContentType = "video/x-ms-wmv"
I have tried to change the Content-Disposition to be inline as well as file
and either work in IE, both work in FireFox. I have also tried content types
"video/x-ms-wmv" and "application/octet-stream" and again neither work in IE,
but Firefox is fine with either.
Thx
Ross
"Neil Smith [MVP Digital Media]" wrote:
I can't see what headers you're sending before the file type.
Probably neither can IE6 or 7, since for all it knows the file is an
html or application/octet-stream type, rather than say video/x-ms-wmv
Since you've hidden the file location by sending just a data stream,
you have to hint the browser what the content type is by sending the
correct file headers before any content is output from your ASPX page.
HTH
Cheers - Neil
On Tue, 9 Jan 2007 18:24:00 -0800, Ross Nornes
<RossNornes@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
With ASP.NET, we can write pages that will do RESPONSE.WRITEFILE or------------------------------------------------
RESPONSE.TRANSMITFILE to force a file to be sent to the browser and it can be
used instead of URL in SRC's. Like <IMG SRC="ImgDownloader.ASPX?ID=10" />
that way the ASPX page creates some security layer so the actual image file
URL is not used thus hiding the image location the server.
Well, I'm trying to so that same thing with embedding a WMV file and IE 7
wont play it properly, but FireFox will.
Same code is:
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="mediaplayer1" ShowStatusBar="true" EnableContextMenu="false"
autostart="false" width="700" height="570" loop="false"
src="http://www.MyDomain.Com/Downloader.aspx?MID=391" />
Any ideas why IE is not taking this? I have not been able to test with IE 6
yet, maybe its just a 7.0 thing. I do know the Downloader.ASPX works fine
since I can download to a file fine and FireFox plays the video just fine....
Thx ahead of time!
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
.
- Follow-Ups:
- Re: Embed WMP Having SRC Point To ASPX Page
- From: Ross Nornes
- Re: Embed WMP Having SRC Point To ASPX Page
- References:
- Re: Embed WMP Having SRC Point To ASPX Page
- From: Neil Smith [MVP Digital Media]
- Re: Embed WMP Having SRC Point To ASPX Page
- Prev by Date: Re: Embed WMP Having SRC Point To ASPX Page
- Next by Date: Re: Embed WMP Having SRC Point To ASPX Page
- Previous by thread: Re: Embed WMP Having SRC Point To ASPX Page
- Next by thread: Re: Embed WMP Having SRC Point To ASPX Page
- Index(es):
Relevant Pages
|