Code:
package com.wowza.wms.example.module;
import com.wowza.wms.application.IApplicationInstance;
import com.wowza.wms.httpstreamer.smoothstreaming.httpstreamer.*;
import com.wowza.wms.module.*;
public class ModuleAccessControlSmoothStreaming extends ModuleBase
{
public void onHTTPSmoothStreamingSessionCreate(HTTPStreamerSessionSmoothStreamer httpSmoothStreamingSession)
{
boolean isGood = true;
String ipAddressClient = httpCupertinoStreamingSession.getIpAddress();
String ipAddressServer = httpCupertinoStreamingSession.getServerIp();
String queryStr = httpSmoothStreamingSession.getQueryStr();
String referrer = httpSmoothStreamingSession.getReferrer();
String cookieStr = httpSmoothStreamingSession.getCookieStr();
String userAgent = httpSmoothStreamingSession.getUserAgent();
IApplicationInstance appInstance = httpSmoothStreamingSession.getAppInstance();
String streamName = httpSmoothStreamingSession.getStreamName();
// Here you can use the request and session information above to determine
// if you want to reject the connection
// isGood = true/false;
getLogger().info("ModuleAccessControlSmoothStreaming.onHTTPSmoothStreamingSessionCreate["+appInstance.getContextStr()+":"+streamName+"]: accept:"+isGood);
if (!isGood)
httpSmoothStreamingSession.rejectSession();
}
}
- Click here, if you are having problems or would like to discuss this article.
- Leave a comment below, if there is some aspect of this article you would like to see changed or improved.


Article List
Categories
Wowza Media