UserAgent for HTTP stream (1 Viewer)

titof

Portal Pro
March 3, 2008
2,248
63
Home Country
France France
Hi,

I have a problem with some HTTP stream which require same UserAgent for each request.

For finding the final url of the video, I send some request to the server with default UserAgent : "Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3"

The serveur send me the final url. This URL MUST be used with same UserAgent of the previous request.

So, in OnlineVideo, I can Download the file because, default UserAgent is used. But in live stream, I have a 403 error message (forbidden).

How can I set a UserAgent for WMPPlayer, OR Internal player ?

Thanks for help !

By !
 

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,989
    3,712
    Stuttgart
    Home Country
    Germany Germany
    You'll have to run it over the internal proxy. Your SiteUtil needs to implement ISimpleRequestHandler.UpdateRequest and the URL sent to the player should be created like this:
    ReverseProxy.GetProxyUri(this, myUrl);
    You can check the ITunesTrailer site which does exactly this ;)
     

    titof

    Portal Pro
    March 3, 2008
    2,248
    63
    Home Country
    France France
    Re : UserAgent for HTTP stream

    Once again, a big big thanks !!

    It's work great ;)

    By !
     

    Users who are viewing this thread

    Top Bottom