This document assumes that you've upgraded to 12.x of Red5 Pro prior to any patches addressing custom Red5 application scope handling. To get your application working, follow the steps below:
- Add the dependency to your pom for red5pro-commons:
<dependency>
<groupId>com.red5pro</groupId>
<artifactId>red5pro-common</artifactId>
<version>12.0.1.0</version>
<scope>compile</version>
</dependency>
- Add the import to your application class:
import com.red5pro.server.IProScopeHandler;
- Add implements for the handler type:
public class Application extends MultiThreadedApplicationAdapter implements IProScopeHandler {
- Add default implementations in your application for the handler interface:
/**
* Sets the stream name alias provider for this scope.
*
* @return provider
*/
public void setStreamNameAliasProvider(IAliasProvider provider) {
// nothing to do here unless you have an alias provider
}
/**
* Returns the stream name alias provider for this scope.
*
* @return provider
*/
public IAliasProvider getStreamNameAliasProvider() {
return null; // add your alias provder reference if used
}
/**
* Returns the webhook endpoint for this scope.
*
* @return webhook endpoint
*/
public String getWebhookEndpoint() {
return null; // replace with your webhook endpoint if used
}
/**
* Sets the webhook endpoint for this scope.
*
* @param webhookEndpoint
*/
public void setWebhookEndpoint(String webhookEndpoint) {
// nothing to do here unless you're using a webhook endpoint
}