Getting around the Firefox wmv streaming problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MaxDemian
Forum Newbie
Posts: 1
Joined: Tue Jan 15, 2008 1:16 pm

Getting around the Firefox wmv streaming problem

Post by MaxDemian »

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.

Code: Select all

<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:

Code: Select all

<?
    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?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: Getting around the Firefox wmv streaming problem

Post by s.dot »

Just a stab in the dark here... try echo readfile()..
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply