Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Windows Media Player HTTP requests

$
0
0

I have written an application that serves as a web server which is capable of serving various files over HTTP. One of the file types it serves is MP4 and this has been working well prior to Windows 8. Starting in Windows 8, when I try to embed the MP4 file in a Windows Media Player object (classid specified to always use WMP), the client (presumably the Windows Media Player ActiveX plugin running in Internet Explorer) sends a seemingly infinite number of GET requests and is not happy with any of the HTTP responses which are being sent. It makes the request, listens to a seemingly arbitrary number of the response packets (containing the MP4 file) and then cuts off the connection and makes another GET request.

The HTML page I am using to embed this MP4 file is as follows:

<html><head><title>WMP player with MP4</title></head><body><object id="MediaPlayer" width="100%" height="100%" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"<param name="FileName" value="myvideo.mp4"><param name="autostart" value="true"><param name="ShowControls" value="true"><param name="ShowStatusBar" value="true"><param name="ShowDisplay" value="false"><embed type="application/x-mplayer2" src="myvideo.mp4" name="MediaPlayer" ShowControls="1" ShowStatusBar="1" ShowDisplay="1" autostart="0"></embed></object></body></html>

The GET requests from WMP look like this:

Request #1 (and 3, 5, 7, etc):

GET /myvideo.mp4 HTTP/1.1
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: getIfoFileURI.dlna.org
Accept: */*
Accept-Language: en-US
Cookie: __qca=P0-928389496-1416623019453
Referer: http://127.0.0.1:56124/myvideo.mp4.htm
User-Agent: NSPlayer/12.00.9600.17031 WMFSDK/12.00.9600.17031
GetContentFeatures.DLNA.ORG: 1
Host: 127.0.0.1:56124

Request #2 (and 4, 6, 8 , etc):

GET /myvideo.mp4 HTTP/1.1
Accept: */*
User-Agent: NSPlayer/12.00.9600.17031 WMFSDK/12.00.9600.17031
Icy-Metadata: 1
Accept-Encoding: gzip, deflate
Host: 127.0.0.1:56124
Connection: Keep-Alive
Cookie: __qca=P0-928389496-1416623019453

And the HTTP response header from my application looks like this:

HTTP/1.1 200 OK
Connection: Close
Content-Length: 3788240
Content Type: video/mp4

followed by a full extra blank line (\r\n). The next packet which is sent is 1500 bytes and contains the

beginning of the myvideo.mp4 file, after which the packets continue to be sent until the connection is closed by the client. This connection closing typically occurs very quickly and always far far before the mp4 file has been completely transferred.

This problem only occurs when running on Windows 8, which uses version 12.00.9600.17031 of Windows Media Player. When using Windows 7, which uses version 12.00.7601.17514 of Windows Media Player,, the process work just fine and the MP4 file is played in Windows Media Player in the browser (only 2 requests sent from WMP, the first connection is closed by WMP and a second request is made however that one is successful and allows the MP4 file response to be sent and played).

Can anyone see something I might do to make this work again on Windows 8? Is there an HTTP header that I am missing? Possibly Windows Media Player is now requiring some specific HTTP feature to be sent in the headers for it to accept the connection and play the file? Any help you can give is appreciated.

Regards,

David


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>