Use Wowza Streaming Engine Java modules

Server-side modules are Java classes that load when a Wowza Streaming Engine™ media server software application starts. They provide much of the functionality that controls the streaming process. This article explores the various types of modules available in Wowza Streaming Engine, including built-in, utility, and custom modules.

About server-side modules


Server-side modules are configured on a per-application basis. They load dynamically when the Wowza Streaming Engine application starts. Server-side modules are useful for controlling Adobe HDS, Apple HLS, Microsoft Smooth Streaming, MPEG-DASH, and RTSP/RTP streaming. They also provide remote methods that can be called from Adobe Flash Player.

Typically, modules are bound to .jar files in the Wowza Streaming Engine installation. Modules can leverage third-party libraries or built-in Java functionality if the dependent .jar files are copied to the lib folder in the Wowza Streaming Engine installation. You control whether and how modules are used by editing them on the Modules tab of the application in Wowza Streaming Engine Manager.

Notes:
  • If you add a module to an application while it's running, you must restart the application for the changes to take effect.  
  • If you modify an installed module, you must restart Wowza Streaming Engine for the changes to take effect.

Use built-in modules


The following modules are built in to Wowza Streaming Engine and are used by applications for basic functionality.

Module Class Description

ModuleCore

com.wowza.wms.module.ModuleCore

Represents the server-side implementation of the Adobe Flash NetConnection, NetStream, and SharedObject objects. Must be included by all applications for Wowza Streaming Engine to operate properly. For information about ModuleCore methods, see Class ModuleCore in the Wowza Streaming Engine Java API reference docs.

ModuleClientLogging

com.wowza.wms.module.ModuleClientLogging

Enables client-side logging to the server. For information about ModuleClientLogging methods, see Class ModuleClientLogging in the Wowza Streaming Engine Java API reference docs.

ModuleFLVPlayback

com.wowza.wms.module.ModuleFLVPlayback

Required by the FLVPlayback component and must be included in any application that uses the FLVPlayback component.

ModuleCoreSecurity

com.wowza.wms.security.ModuleCoreSecurity

Provides publishing and playback security, replacing many of the security modules previously included in the Module Collection in Wowza Media Server software. Functionality provided by this module includes:

  • Enable/disable RTMP publishing

  • Require RTMP publishing password

  • Allow duplicate stream names to be published, or prevent them from being published

  • Whitelist/blacklist publishers or players by IP address

  • Limit the number of player connections

  • Require secure RTMP connection for playback

  • Require a security token for Flash-based playback

See Configure security using Wowza Streaming Engine Manager.

ModulePushPublish

com.wowza.wms.pushpublish.module.ModulePushPublish

Allows Wowza Streaming Engine to deliver streams to another server or to a third-party CDN and provides methods for debugging.

Use utility modules


Several ready-to-use utility modules are also available to for Wowza Streaming Engine. The Wowza IDE is not required to implement these modules.

These utility modules are designed for Wowza Streaming Engine. They offer such useful functions as adding an audio track to a video-only stream, which some CDNs require, and sending connection and stream stats to Google Analytics. Most are backward-compatible, however, some aren't fully supported in Wowza Media Server™ software.

Every utility module is documented by an article that provides a link to downloade the module and includes configuration instructions. Each article also links to the module's source code on GitHub. See Module examples for a complete list of all utility module articles.

Use custom modules


Finally, you can develop your own module classes—and custom methods—using the Wowza IDE.

Here's a sample custom module that uses the event method onAppStart and the custom method doSomething:

package com.mycompany.module;

import com.wowza.wms.module.*;
import com.wowza.wms.client.*;
import com.wowza.wms.amf.*;
import com.wowza.wms.request.*;

public class MyModule extends ModuleBase
{
    public void onAppStart(IApplicationInstance appInstance)
    {
        getLogger().info("onAppStart");
    }

    public void doSomething(IClient client, RequestFunction function,
                    AMFDataList params)
    {
        getLogger().info("doSomething");
    }
}

To use a custom module like this, compile it, package it into .jar file, and put it in the [install-dir]/lib folder. Then, add it to an application by going to the application's Module tab in Wowza Streaming Engine Manager, clicking Add Module, and specifying the module's Name, Description, and Fully Qualified Class Name. When you're done, the new module appears in the list and is ready for the application to use.