Hi,
I am facing problem with custom module and WebRTC stream with Wowza server and I am using JDK-14.0.1 for Java and I am unable to publish WebRTC Stream.
I created a Java module and it doesn’t have any logic and it contains only logging. I create a app in wowza with name bienapp and add custom module in bienapp as below:
When I try publish WebRTC Stream then i get "Publish failed. Unable to connect."
Custom module code
package com.bientechnologies.wowza;
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.transcoder.util.TranscoderStreamUtils;
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.*;
public class BienApplication extends ModuleBase {
// private BienStreamListener bienStreamListener;
public void doSomething(IClient client, RequestFunction function, AMFDataList params) {
getLogger().info("doSomething");
sendResult(client, params, "Bien-Hello Wowza");
}
public void onAppStart(IApplicationInstance appInstance) {
String fullname = appInstance.getApplication().getName() + "/" + appInstance.getName();
getLogger().info("Bien-onAppStart: " + fullname);
// this.bienStreamListener = new BienStreamListener(appInstance);
}
public void onAppStop(IApplicationInstance appInstance) {
String fullname = appInstance.getApplication().getName() + "/" + appInstance.getName();
getLogger().info("Bien-onAppStop: " + fullname);
}
public void onConnect(IClient client, RequestFunction function, AMFDataList params) {
getLogger().info("Bien-onConnect: " + client.getClientId());
}
public void onConnectAccept(IClient client) {
getLogger().info("Bien-onConnectAccept: " + client.getClientId());
}
public void onConnectReject(IClient client) {
getLogger().info("Bien-onConnectReject: " + client.getClientId());
}
public void onDisconnect(IClient client) {
getLogger().info("Bien-onDisconnect: " + client.getClientId());
}
public void onStreamCreate(IMediaStream stream) {
getLogger().info("Bien-onStreamCreate: " + stream.getSrc());
//AMFPacket keyFrame = stream.getLastKeyFrame();
//fitmode: Fit mode (how video frame is fit to frame size). Valid values are letterbox, stretch, fit-height, fit-width, match-source, crop (default is letterbox).
//int fitmode = TranscoderStreamUtils.frameSizeFitModeToId("letterbox");
}
public void onStreamDestroy(IMediaStream stream) {
getLogger().info("Bien-onStreamDestroy: " + stream.getSrc());
}
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) {
getLogger().info("Bien-onHTTPSessionCreate: " + httpSession.getSessionId());
}
public void onHTTPSessionDestroy(IHTTPStreamerSession httpSession) {
getLogger().info("Bien-onHTTPSessionDestroy: " + httpSession.getSessionId());
}
public void onHTTPCupertinoStreamingSessionCreate(HTTPStreamerSessionCupertino httpSession) {
getLogger().info("Bien-onHTTPCupertinoStreamingSessionCreate: " + httpSession.getSessionId());
}
public void onHTTPCupertinoStreamingSessionDestroy(HTTPStreamerSessionCupertino httpSession) {
getLogger().info("Bien-onHTTPCupertinoStreamingSessionDestroy: " + httpSession.getSessionId());
}
public void onHTTPSmoothStreamingSessionCreate(HTTPStreamerSessionSmoothStreamer httpSession) {
getLogger().info("Bien-onHTTPSmoothStreamingSessionCreate: " + httpSession.getSessionId());
}
public void onHTTPSmoothStreamingSessionDestroy(HTTPStreamerSessionSmoothStreamer httpSession) {
getLogger().info("Bien-onHTTPSmoothStreamingSessionDestroy: " + httpSession.getSessionId());
}
public void onRTPSessionCreate(RTPSession rtpSession) {
getLogger().info("Bien-onRTPSessionCreate: " + rtpSession.getSessionId());
}
public void onRTPSessionDestroy(RTPSession rtpSession) {
getLogger().info("Bien-onRTPSessionDestroy: " + rtpSession.getSessionId());
}
public void onCall(String handlerName, IClient client, RequestFunction function, AMFDataList params) {
getLogger().info("Bien-onCall: " + handlerName);
}
}
Kindly suggest on above.
Thanks