Wowza Community

Add Stream with user agent

Hello Friends,

I want to add Stream File from hls URL (m3u8) but I can not find a place to put user agent.

How to add it because the link does not work without user agent

in vlc player i add on options :http-user-agent=45445msmn5

It works well

thanks

Is there anyone here to help???

Checking for you now and will post very soon

There is a Java level property called http.agent which can be defined within the JVM on instance startup. Is this what you are referring to?

http.agent (default: “Java/”)

  • Defines the string sent in the User-Agent request header in http requests. Note that the string “Java/” will be appended to the one provided in the property (e.g. if -Dhttp.agent=”foobar” is used, the User-Agent header will contain “foobar Java/1.5.0” if the version of the VM is 1.5.0). This property is checked only once at startup.

https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html

It would be set via conf/Tune.xml as a VMOption, e.g.

The example I provided whereby you can set the Java built-in property http.agent on Wowza startup is where you would change what user agent is used when making HTTP requests (for example, when pulling in an applehls HLS MediaCaster stream).

As noted, the Java version number will always be appended to any custom http.agent setting. This is also a global setting for the lifetime of the Wowza instance and cannot be set at the application or stream layer.

We use the user agent as set in the JVM when Wowza starts up @alex molass. You can change this via the http.agent property, for example in conf/Tune.xml by adding the following VMOption

-Dhttp.agent=myagent

Note however that the JVM does not allow you to completely overwrite the user agent. Instead it will prepend it to the existing value.

Again, it is explained here and I hope this helps:

https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html

hi, did you solve this issue. I have the same issue, adding -Dhttp.agent=myagent in conf/Tune.xml not working for me