michael nesterenko michael nesterenko -4 years ago 175
Java Question

wowza onAppStart method call

I try to build module for

wowza 3.6.2
. My module needs to get instance of an
IApplicationIdstance
, all samples I found do it in
onAppStart
method, however it is not called when I access wowza application.

I have following:

public class TestModule extends ModuleBase {

public void onAppStart(IApplicationInstance appInstance) {
String fullname = appInstance.getApplication().getName() + "/"
+ appInstance.getName();
getLogger().info("onAppStart: " + fullname);
}

public void onAppStop(IApplicationInstance appInstance) {
String fullname = appInstance.getApplication().getName() + "/"
+ appInstance.getName();
getLogger().info("onAppStop: " + fullname);
}
....
}


Application configuration:

<Module>
<Name>TestModule</Name>
<Description>MyTestModule</Description>
<Class>mnesterenko.TestModule</Class>
</Module>


Also I have
applications/myapp
and
conf/myapp/Application.xml
.

I open
http://wowza_ip:1935/myapp
in browser, but
onAppStart
is not called, what am I missing?

Answer Source

the reason is that your HTTP link is catched by wowza HTTPProviders. Wowza modules are used when you access "streaming" features of wowza (in general). so if you'll do RTMP connect to specific app instance then it will work. also, you can work with application "via HTTP", however that will require you to request specific HTTP streaming URL like http://example.com/path/to/file.ext/playlist.m3u8

so wowza combines streaming server and web server inside it.

read more about HTTPProviders if you want to catch such requests. https://www.wowza.com/docs/http-providers

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download