Skip to content

Instantly share code, notes, and snippets.

@mondain
Created April 22, 2024 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mondain/c9644c6f6ccbb49a0da8361c796f5e2f to your computer and use it in GitHub Desktop.
Save mondain/c9644c6f6ccbb49a0da8361c796f5e2f to your computer and use it in GitHub Desktop.
Updating a custom Red5 application to newer Red5 Pro Server before handler patch is available

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
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment