Hello,
I have downloaded the Wowza IDE for Eclipse package and installed the JDK and Ant packages on my Windows PC. I have followed the Wowza IDE users guide to build a server side extension, exported the module to a jar file, copied it to the /lib directory on my CentOS system, updated the Application.xml file to include my new module, restarted the Wowza server and I do not see the new module getting loaded. There are no errors in either of the Wowza log files nor any reference to loading my new module. The module contains no new code from me; I wanted to keep things simple since this is my first server side module, so all I wanted to do was start with the example and see if my new module is loaded. The module contains all the standard functions that are created by default when you follow the IDE guide.
My client side player is jwplayer and I’m using RTMPE with secure token implemented. Everything works when I do not include my new server side module. As soon as I include my module in the Application.xml file and restart the server, my audio files no longer play. It appears that the jwplayer is making a request to the Wowza server, but I don’t see any activity in the Wowza logs. The jwplayer is set to automatically play the mp3 file so I see the play button change to the pause button, but nothing happens. After a few seconds the pause button returns to the play button but no audio is played. I remove the new module (that only contains default Wowza code) and everything works perfectly. Below is a copy of the module code that was created and a copy of the module element I added to the Modules section of the Application.xml file. What am I doing wrong? (code that I want to add is commented out - only the default code is active) Thanks for any help.
java version on CentOS:
java version “1.6.0_20”
OpenJDK Runtime Environment (IcedTea6 1.9.10) (rhel-1.23.1.9.10.el5_7-i386)
OpenJDK Server VM (build 19.0-b09, mixed mode)
java version on Windows PC using Eclipse and Wowza add-on
java version “1.7.0_05”
Java™ SE Runtime Envirionment (build 1.7.0_05-b06)
Java HotSpot™ 64-Bit Server VM (build 23.1-b03, mixed mode)
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_05
module code from Eclipse IDE
package com.hotlinesinc.wms.pgp.module;
import com.wowza.wms.application.*;
import com.wowza.wms.amf.*;
import com.wowza.wms.client.*;
import com.wowza.wms.module.*;
import com.wowza.wms.request.*;
import com.wowza.wms.stream.*;
import com.wowza.wms.rtp.model.*;
import com.wowza.wms.httpstreamer.model.*;
import com.wowza.wms.httpstreamer.cupertinostreaming.httpstreamer.*;
import com.wowza.wms.httpstreamer.smoothstreaming.httpstreamer.*;
//import java.io.File;
public class HotlinesPGPModule extends ModuleBase {
// private IApplicationInstance _appInstance;
public void doSomething(IClient client, RequestFunction function,
AMFDataList params) {
getLogger().info(“doSomething”);
sendResult(client, params, “Hello Wowza”);
}
public void onAppStart(IApplicationInstance appInstance) {
// _appInstance = 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);
}
public void onConnect(IClient client, RequestFunction function,
AMFDataList params) {
getLogger().info("onConnect: " + client.getClientId());
}
public void onConnectAccept(IClient client) {
getLogger().info("onConnectAccept: " + client.getClientId());
}
public void onConnectReject(IClient client) {
getLogger().info("onConnectReject: " + client.getClientId());
}
public void onDisconnect(IClient client) {
getLogger().info("onDisconnect: " + client.getClientId());
//String fileName = _appInstance.getStreamStoragePath() + client.getStreamFile(null);
//String fileName = _appInstance.getStreamStoragePath() + “/112105da.mp3”;
//File mediaFile = new File(fileName);
//Boolean success = mediaFile.delete();
//getLogger().info(“Info: deleting [” + fileName + "] result: " + success);
}
}
Application.xml module entry
HotlinesPGPModule
Hotlines PGP Encyption
com.hotlinesinc.wms.pgp.module.HotlinesPGPModule