How to get Client User Agent

There is IClient.getPageUrl() method and I wonder if there is something like IClient.getPageUserAgent() to get user agent of client that loaded the player. Is someone has answerfor this?

Use IClient.getFlashVer()

Richard

I’m not sure if that is possible server-side in a Wowza module. You can get the URL like this:

String pageUrl = client.getProperties().getPropertyStr("connectpageUrl")

You should be able to get the HTML container’s user agent client-side in Flash

Richard

This came to the top of search:

http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-Request-Headers.html

Richard

I’ve showed you how to get the HTML container of the Flash application, you should be able to get the userAgent of that page. I have also showed you how to get the user agent of the Flash application, the swf. I’m not sure what else to suggest.

Richard

If you have the URL to a web page you should be able to get user agent from the HTTP headers. If the client is Flash, that is the HTML container, not the actual client. You can get the actual client user agent with IClient.getFlashVer(). I’m not sure what else to suggest.

Richard

It is the same thing in this case, as far as I know.

Richard

I think it returns Flash version and I want user-agent of the page th player is embed in.

I’m not sure too, but Wowza has IClient.getPageUrl() method, so they think that it is possible.

I know about HTTP headers, but in wowza you sometimes stream http, sometimes rtmp and other protocols. I don’t know, whether flash players send to server user agent of the page they are embedded in and how to get it from wowza API.

Sory, I missed the end of your message and thought that getProperties() just returns client configuration. Thank you for help.

I made a test with client.getProperties().getAllAsStrings() and I see that is dosen’t had something like ‘connectPageUserAgent’. Is it normal, or I should see something?

I think that getFlashVer() is actualy ‘connectflashVer’ property in my test? I see that it is ‘connectflashVer=WIN 11,1,102,55’. It means version of adobe flash and not user agent.

I’m also think so, but I don’t sure. I have ‘connectswfUrl’, ‘connectpageUrl’ and ‘connecttcUrl’, so I thought that may be ‘connectflashVer’ is for flash agent and there is something like ‘connectPageVer’ for http user agent header. However, I see that I was wrong.