Re: Feeding Windows Media Player with PHP
- From: "Neil Smith [MVP Digital Media]" <neil@xxxxxxxxxx>
- Date: Mon, 15 Jan 2007 22:45:47 GMT
Zach was right, I typo'd my way through that : Should be
video/x-ms-wmv for .wmv, and audio/x-ms-wma for .wma, or
video/x-ms-asf (for either wma or wmv in .asf file type)
For MP3 you should definitely send audio/mpeg header though ;-)
See here for further details if you do use WM MIME types :
http://www.microsoft.com/windows/windowsmedia/howto/articles/webserver.aspx#webserver_topic2
Cheers - Neil
On Mon, 15 Jan 2007 12:11:12 -0800, JayEpoch
<JayEpoch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Thanks for the replies guys, I'm not using wmv though... I'm using MP3, what------------------------------------------------
header should I use then?
Thanks, I really appreciate your help.
Jason@ProtonRadio
"zachd [MSFT]" wrote:
I'm loosely the manager of MIME types for the team - as a minor note, I
don't believe there is a application/x-ms-wmv MIME type. video/x-ms-wmv may
be what you meant... ?
As regards the OP, Content-Disposition is meant to get the content to
download 100% first. As far as I'm aware, WinAMP and iTunes are doing the
wrong thing here...
-Z
--
Speaking for myself only.
See http://zachd.com/pss/pss.html for some helpful WMP info.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
"Neil Smith [MVP Digital Media]" <neil@xxxxxxxxxx> wrote in message
news:lf0iq21gk5upd80bhvvlgh6t7sfpec9m08@xxxxxxxxxx
You should be sending a header of application/x-ms-wmv there, I'm not
sure what all this force download and attachment stuff is ~intended~
to do, but it seems to be having the effect of doing exactly what
you've told it !
Just send the correct content-type header, then send the
content-length, then the binary stream data.
Cheers - Neil
On Fri, 12 Jan 2007 14:30:02 -0800, JayEpoch
<JayEpoch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
------------------------------------------------
I'm trying to develop a playlist in Windows Media Player where the audio
is
fed through PHP for security reasons. It works fine in Winamp and iTunes,
but
Windows Media can't play the file.
We're trying this header with PHP:
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,
pre-check=0");
header("Cache-Control: private",false);
header("Content-type: application/force-download");
header('Content-Transfer-Encoding: Binary' ); // added
header("Content-Disposition: attachment;
filename=\"".basename($FILE)."\";" );
readfile ( $URL );
And so far we get it where it DOWNLOADS the file 100% and then starts
playing. Is there anyway to have it start playing while its downloading,
like
iTunes and Winamp does?
Thanks for any help!
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
Digital Media MVP : 2004-2007
http://mvp.support.microsoft.com/mvpfaqs
.
- References:
- Re: Feeding Windows Media Player with PHP
- From: Neil Smith [MVP Digital Media]
- Re: Feeding Windows Media Player with PHP
- From: zachd [MSFT]
- Re: Feeding Windows Media Player with PHP
- From: JayEpoch
- Re: Feeding Windows Media Player with PHP
- Prev by Date: Re: Hate WMP 11 Library layout & navigation
- Next by Date: Re: WMP 11 freezes computer and block CPU to 100 %
- Previous by thread: Re: Feeding Windows Media Player with PHP
- Next by thread: Re: Is it possible to store my media player library on network hard dr
- Index(es):
Relevant Pages
|