This code seems to work just fine when I view the page in IE. But when I view it in Firefox, the embedded WMP just says "Ready" and the play button does nothing.

<OBJECT ID='NSPlay' WIDTH='400' HEIGHT='300' CLASSID='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject'>
    <PARAM NAME='FileName' VALUE='video_play_2416.wmv'>
    <PARAM NAME='AutoSize' VALUE='0'>
    <PARAM name='AutoStart' VALUE='1'>
    <PARAM name='ShowControls' VALUE='1'>
    <PARAM name='ShowDisplay' VALUE='0'>
    <param name='ShowStatusBar' value='1'>
    <EMBED TYPE='application/x-mplayer2' SRC='video_play_2416.wmv' NAME='NSPlay' WIDTH='400' HEIGHT='300' AutoSize='1' AutoStart='1' ShowControls='1' ShowDisplay='0' ShowStatusBar='1'></EMBED>
</OBJECT>

video_play_2416.wmv converts to video_get.php?id=2416 in my .htaccess. Here is the basic code for the video_get.php:

<?
    header("Content-Type: video/x-ms-wmv");
    header("Accept-Ranges: bytes");
    header("Content-Length: ".filesize("video_$id.wmv"));
    header("Content-Disposition: attachment; filename=\"video_$id.wmv\"");
    readfile("video_$id.wmv");
?>

It works fine in Firefox if I link it directly to the wmv, but doesn't work if it has to go through the script. Works fine both ways in IE. I Google'd around and all I have found is that other people seem to be having the same problem. Does anyone have a way to make it work for Firefox?

    Maybe try converting it to FLV and using a Flash Video Player?

    I purchased a Utilitity from CoffeeCup Software which works great for me. It will convert it and allow me to choose from a large variety of "faces". I have tested it amongst numerous browsers & os's including Safari Win/mac, FF Win/Linux, IE 6/7Win.

    They have a trial edition - don't know about limitations on it but it should work.

    If you search around you can find many Flash Converter/Players out there for web sites.

      3 months later

      Did you have any luck with this problem? I am having the same problem and am leaning towards the idea of converting everything to FLV though I would rather not have to go through that hassle! I want the video files protected though and I am using a similar method to the one you described. Thanks.

        Write a Reply...