|
Posted by Richard Lynch on 03/03/05 22:05
Cabbar Duzayak wrote:
> 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 it happen the same in a different browser?
Perhaps the *browser* snags the first 65K to see if it really *IS* a
MediaPlayer file, and then hands off the URL to Media Player or its plugin
or whatever, which gets the whole file to play it.
The media player itself may also have plugins for reading the beginning of
a .wmv file in order to display the artist, title, etc info as text, then
a different plugin to read the actual audio, which snags the whole file.
> Does anyone have any idea why this is happening and how I can avoid
> this double request?
I doubt you can "avoid" it at all...
It's also remotely possible that WMV files have embedded quality levels,
so the first 56K is a "test" to see what sort of connection speed is
available, and then Media Player decides to get the "HiFi" or "LoFi" (or
whatever) from the stream... That would be a really dumb way to do things
(unlike Apple's RTSP protocol) but we *are* talking Microsoft, here, and
they do a *lot* of dumb things :-)
I sincerely doubt this last explanation has any basis in fact -- Only that
it *could* be true, given what little I know of WMV and MS... Is WMV even
an "open" standard, or is it all hidden?
--
Like Music?
http://l-i-e.com/artists.htm
[Back to original message]
|