# How to get Client User Agent

**URL:** <https://community.wowza.com/t/how-to-get-client-user-agent/36286>\
**Category:** Wowza Streaming Engine\
**Created:** [January 17, 2012, 3:29pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286 "2012-01-17T15:29:02Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 17, 2012, 3:29pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/1 "2012-01-17T15:29:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 17, 2012, 2:35pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/2 "2012-01-17T14:35:28Z")

</div>

Use IClient.getFlashVer()

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 17, 2012, 3:49pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/3 "2012-01-17T15:49:32Z")

</div>

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

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

```

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

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 17, 2012, 4:26pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/4 "2012-01-17T16:26:38Z")

</div>

This came to the top of search:

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

Richard

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 18, 2012, 11:59am UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/5 "2012-01-18T11:59:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 18, 2012, 1:48pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/6 "2012-01-18T13:48:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)\
**Post date:** [January 18, 2012, 1:56pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/7 "2012-01-18T13:56:38Z")

</div>

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

Richard

---

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 17, 2012, 5:23pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/8 "2012-01-17T17:23:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 17, 2012, 6:13pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/9 "2012-01-17T18:13:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 18, 2012, 1:08pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/10 "2012-01-18T13:08:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 18, 2012, 2:14pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/11 "2012-01-18T14:14:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 18, 2012, 3:43pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/12 "2012-01-18T15:43:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 18, 2012, 3:55pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/13 "2012-01-18T15:55:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Igor\_Grinfeld](https://avatars.discourse-cdn.com/v4/letter/i/5fc32e/32.png) [@Igor\_Grinfeld](https://community.wowza.com/u/Igor_Grinfeld)\
**Post date:** [January 18, 2012, 4:10pm UTC](https://community.wowza.com/t/how-to-get-client-user-agent/36286/14 "2012-01-18T16:10:02Z")

</div>

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.
