Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Getting around the Firefox wmv streaming problem

    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:
    <object ID='NSPlay' WIDTH=400 HEIGHT=300 classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...'  type='application/x-oleobject'>
    	<PARAM NAME='FileName' VALUE='video_play_2416.wmv'>
    	<PARAM NAME='ShowControls' VALUE='1'>
    	<PARAM NAME='ShowDisplay' VALUE='0'>
    	<PARAM NAME='ShowStatusBar' VALUE='1'>
    	<PARAM NAME='AutoSize' VALUE='0'>
    	<PARAM NAME='AutoStart' VALUE='1'>
    <embed type='application/x-mplayer2' pluginspage='http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/' src='video_play_2416.wmv' Name=NSPlay ShowControls=1 ShowDisplay=0 ShowStatusBar=1 AutoStart=1 width=400 height=340></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:

    PHP Code:
    <?
    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");
    ?>
    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?

  • #2
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    Try type="application/wmplayer" in your embed tag ... I'm not promising anything but that might work!

    Also, I you need to correct plugin installed in FF (but I'm sure you know that!).

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I forgot to mention. With that html embed code, it works fine in Firefox if I link it directly to the wmv. Just not when it goes through the script. But it works fine in IE both ways.

  • #4
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    Ok, I did a little rummage myself on Google because this is of interest to me too!

    Here's something I found (Check out Shadow2531's code and explanation) - it seems it is dependent upon specifying the correct content type, which makes sense! (Incidentally, I notice you have conflicting content types when using the script and the XHTML).

    I haven't tried his solution, but upon reading his explanation I can see why your code doesn't work in FF
    Last edited by mlse; 01-16-2008 at 10:49 AM. Reason: Ooops! Forgot to post the all-important URL! Lol!

  • #5
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I did what it said on that site and it still doesn't seem to be working. Like I said, it plays fine when I input a wmv url directly, just not when I do it through the script.
    Last edited by MaxDemian; 01-16-2008 at 07:08 PM.

  • #6
    Regular Coder mlse's Avatar
    Join Date
    Mar 2005
    Posts
    624
    Thanks
    20
    Thanked 19 Times in 18 Posts
    Just a thought ... but might it be easier to do something in your php file like this:

    PHP Code:
    <?
    $videofile 
    "video_$id.wmv";

    if (
    file_exists($videofile)) print($videofile);
     else <
    whatever>;
    ?>
    I got that to work just fine in conjunction with the method I posted earlier (as you might expect) and works fine in both browsers with your code too.
    Last edited by mlse; 01-17-2008 at 10:55 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •