Weird WMV/Media Player behaviour (Loading media file twice)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have embedded a media player on my page with the html pasted below,
and modified my .htaccess file to redirect this /aa/bb/cc.wmv to a php
file...

My php file (used below) does nothing, but logs the requests+checks
access, opens the actual .wmv file and prints it out. The problem when
I use the following code is that, media player (for some reason) sends
2 requests to the source (http://www.mydomain.com/aa/bb/cc.wmv) to
show this instead of one, the first one reads something like 65K, then
it sends the second request to retrieve the whole file... I checked it
in various ways (verified that it is not because of .htaccess, my
code!), but could not figure out why. And,  2 requests come within 1
second difference (the server is on a local network).

Does anyone have any idea why this is happening and how I can avoid
this double request?

Your help is definitely appreciated since I am out of answers here;)

Here is my html code:

<object ID="RTVPlay" 
        classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
        codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701";
        standby="Reklam yükleniyor lütfen bekleyiniz..."
        type="application/x-oleobject">
<param NAME="FileName" Value="http://www.mydomain.com/aa/bb/cc.wmv";></param>
<param NAME="ShowControls" VALUE="1"> </param>
<param NAME="ShowDisplay" VALUE="0"> </param>
<param NAME="ShowStatusBar" VALUE="0"> </param>
<param NAME="AutoSize" VALUE="0"> </param>
<param NAME="AutoStart" VALUE="true"> </param>
<param NAME="Volume" VALUE="0"> </param>
<param NAME="pluginspage"
VALUE="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/";></param>
<embed type="application/x-mplayer2"
       pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/";
       filename="http://www.mydomain.com/aa/bb/cc.wmv";
       name="RTVPlay" ShowControls="1" ShowDisplay="0" ShowStatusBar="0"
       width="355" height="337" AutoSize="1" AutoStart="true" volume="1000">
</embed>
</object>

For those of you who want to do this (load a media file via php), two
tips (it took hours for me to figure these out, not to mention the
whole frustration;):

- First of all, if the source filename/url does not end with .wmv
(i.e. if you have /aa/bb/cc.php), Windows Media Player plugin craps
out and the following html code shows nothing, and it took a serious
while to figure this out;)

- When Windows Media Player sends the request, it does not send any cookies...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux