I publish a stream to Wowza and log a ClientID.
can I send this ClientID to Wowza by HTTP get method to terminate the publishing??
anybody please show me how to do , please!!
I publish a stream to Wowza and log a ClientID.
can I send this ClientID to Wowza by HTTP get method to terminate the publishing??
anybody please show me how to do , please!!
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession) throws UnsupportedEncodingException
{
String queryStr = httpSession.getQueryStr();
String[] queryStrArray = queryStr.split("="); getLogger().info(“queryStr>>>>>>>>>>>”+queryStrArray[1]);
IClient newClient = client.getAppInstance().getClientById(Integer.parseInt(queryStr));
newClient.setShutdownClient(true);
}
The code above just show what I want to do , It’s not working.
queryStr is ClientID that I logged before.
Any Wowza master can give me direction??
Any suggestion or answer is welcome even just yes or no.
If It is impossible to do this. please left message to me.
Help!! Thanks.
Hi, It looks work for me, not perfect but work
public void onHTTPSessionCreate(IHTTPStreamerSession httpSession)
{
String queryStr = httpSession.getQueryStr();
String queryStrIdValue = queryStr.split("=")[1];
IApplicationInstance appInstance = httpSession.getAppInstance();
if(queryStrIdValue != null)
{
IClient client = appInstance.getClientById(Integer.valueOf(queryStrIdValue));
client.setShutdownClient(true);
}
}