Embedded Microsoft Media Player sending multiple request for single audio file

Unanswered Embedded Microsoft Media Player sending multiple request for single audio file

  • Wednesday, March 28, 2012 3:00 PM
     
     

    I have an ASP.NET MVC web application and one of my pages contains an embedded Microsoft Media Player object (I am only using IE). It looks like the Microsoft Media Player is sending two or more request to retrieve the audio.

    It's sending at least: GET http://10.5.0.120/audiostream/full/10.5.0.119/10.5.0.119Node/40/9/1050119-1050119Node-40.wav HTTP/1.1 Cache-Control: no-cache Pragma: getIfoFileURI.dlna.org Accept: /Cookie: ASP.NET_SessionId=1hpu1dkgoq5weatihjxxvaj5; .ASPXAUTH=FB6B3D2EC297E6FB62D307E91C930B9F2805CBD24FF7E52DE82ADFC5CD47AA61B01899B9CE7EA98376E6790430AA6F09C87717CC57836CD04280769C5A106E1F39F81A7EDBEE2A753D77DCF10F20D4801D17933B84BC98A997705F60CD687AF361C906C70A4395CC6C4D1C940B27B8E6DC642D01AB16B5E1F9EADA03B469A5FB25B47C648D80660743590EF5A6FA50E7 If-Modified-Since: Tue, 13 Mar 2012 12:48:49 GMT User-Agent: NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514 GetContentFeatures.DLNA.ORG: 1 Connection: Keep-Alive Host: 10.5.0.120

    and

    GET http://10.5.0.120/audiostream/full/10.5.0.119/10.5.0.119Node/40/9/1050119-1050119Node-40.wavHTTP/1.1 Accept: / User-Agent: NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514 Icy-Metadata: 1 Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: 10.5.0.120 Cookie: ASP.NET_SessionId=1hpu1dkgoq5weatihjxxvaj5; .ASPXAUTH=FB6B3D2EC297E6FB62D307E91C930B9F2805CBD24FF7E52DE82ADFC5CD47AA61B01899B9CE7EA98376E6790430AA6F09C87717CC57836CD04280769C5A106E1F39F81A7EDBEE2A753D77DCF10F20D4801D17933B84BC98A997705F60CD687AF361C906C70A4395CC6C4D1C940B27B8E6DC642D01AB16B5E1F9EADA03B469A5FB25B47C648D80660743590EF5A6FA50E7

    The difference I see: the first request contains a header “getIfoFileURI.dlna.org” and the second “Icy-Metadata”. Why do I get to request, and is it possible to return a request the first time, so the second is not required?

    I also noticed, when I use a mp3 instead of a wav I only get one request.

    Thanks.

All Replies

  • Thursday, March 29, 2012 6:46 AM
     
     

    Hi,

    Which version of the Google Chrome Frame BHO are you hosting in IE?

    copy the resource url into Media Player and use your network sniffer to view the traffic... you should see the same behavior and the same UAS.

    compare that with say playing the same wave file uri in irfanview.

    see http://www.dlna.org/


    Rob^_^

  • Thursday, March 29, 2012 11:27 AM
     
     

    Hi Rob,


    if you open the wav using the desktop Windows Media Player, you have more or less the same behavior. Then Media Player is also sending two request (in this case two requests with the same headers, see “http://www.johnny-online.nl/uploaded/Screenshot Fidler.png”.


    You can try it yourself by opening the wav below in Windows Media Player 12.
    http://www.johnny-online.nl/uploaded/chimes.wav


    Why do you ask which version of the Google Chrome Frame BHO I am hosting in IE? (answer: I am not hosting any version). What is the connection with Windows Media Player?

    I also created a sample, see http://www.johnny-online.nl/
    Johan



    • Edited by JohnnyWoef Thursday, March 29, 2012 12:03 PM
    •  
  • Friday, March 30, 2012 8:02 PM
     
      Has Code

    Hi,

    add return false; to the input onclick events.

    <input onclick="loadAudio('1.wav');return false;" value="Load Audio 1" type="button"/>
    

    or use the html5 dtd and place all form elements (input) within a form block...

    Update Visual Studio to MVC 4 and download the Nuget utility so that you include the latest versions of jQuery and modernizr in your projects

    http://forums.asp.net/1146.aspx/1?MVC


    Rob^_^

  • Sunday, April 01, 2012 10:03 AM
     
     

    Hi Rob,

    I don't understand what the "return false", html5 and MVC4 has to with the problem I have with the embedded WMP.....but to be sure I have updated the code with all your recommendations, but I still get to requests :(

    Johan

  • Monday, April 02, 2012 12:10 AM
     
     

    Hi,

    your mashup page just shows that the onclick event handler for the button click is firing twice. the return false; should prevent the second event...

    normally <input type="button".... must be within a <form> block but the dtd you are using allows it... (validate your markup at validator.w3.org)....

    there was a bug in earlier versions of asp.net and visual studio that submitted to requests when a submit button was clicked on a post-back form and there have been changes made to IE versions in the way form event handlers process button clicks v form submit event handlers.

    MVC of coarse does not use form postbacks, so without knowing what version you are using I can only assume you are using an earlier version. You could also try using a <button> element instead of a <input type="button"> element...

    To make sure you are using the latest version of MVC for VS, update your VS to SP1 - includes intellisence updates for html5 syntax... the latest version of MVC is 4 and includes a VS addon called nuget which will help you ensure that you are using the latest versions of the jQuery and Modernizr shims in your MVC 4 projects. the MVC 4 template projects default to using the html5 dtd which is required if your target platforms include SmartPhone devices or iPad or Windows 8 metro apps.

    You are using an old version of jQuery..... see bugs.jquery.com .... contrary to popular beleifs... yes jQuery has bugs that they are continually finding. You use jQuery methods to inspect the response header... when I use the IE Developer tool's Network inspector there is no request raised.... you are only changing the src attribute value.

    You may want to download the WMP SDK and examine their samples... It looks like you are trying to customize the default embedded WMP buttons or perhaps adding a playlist.... there are documented design patterns in the SDK for that.


    Rob^_^

  • Thursday, May 03, 2012 7:17 AM
     
     

    Hi Rob,<o:p></o:p>

    it has nothing to do with jQuery, MVC or any SP of Visual Studio. If I just use a simple html page with a WMP embedded, I am experience the same problem.<o:p></o:p>

    Johan.<o:p></o:p>

  • Thursday, May 03, 2012 8:30 AM
     
      Has Code

    np here....

    Fiddler session headers...

    GET /uploaded/chimes.wav HTTP/1.1
    Cache-Control: no-cache
    Pragma: getIfoFileURI.dlna.org
    Accept: */*
    User-Agent: NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514
    GetContentFeatures.DLNA.ORG: 1
    Connection: Keep-Alive
    Host: www.johnny-online.nl

    HTTP/1.1 200 OK
    Content-Type: audio/wav
    Last-Modified: Thu, 29 Mar 2012 11:17:19 GMT
    Accept-Ranges: bytes
    ETag: "a7575b819ddcd1:0"
    Server: Microsoft-IIS/7.5
    X-Powered-By: ASP.NET
    Date: Thu, 03 May 2012 08:27:41 GMT
    Content-Length: 216364
    Connection: keep-alive

    Source:

    <!DOCTYPE html>
    <html>
    
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <title>Untitled 1</title>
    </head>
    
    <body>
    
    <p>
    <object id="media1" height="200" type="video/x-ms-wmv" width="200">
    <param name="filename" value="http://www.johnny-online.nl/uploaded/chimes.wav">
    </object></p>
    
    </body>
    
    </html>
    



    Rob^_^