Limit the number of viewers of a stream with a Wowza Streaming Engine Java module

The ModuleLimitStreamViewers module for Wowza Streaming Engine™ media server software lets you limit the number of concurrent viewer connections to a stream. You can set a viewer limit for an entire application or set specific limits for each stream in an application.

Contents


Prerequisites
Installation
Configuration
Properties
Usage
For developers

Prerequisites


Wowza Media Server™ 3.6.3 (or later) or Wowza Streaming Engine™ 4.0.0 (or later) or Wowza Media Server™ 3.6.3 (or later) is required.

Installation


  1. Download wse-plugin-limitstreamviewers.zip.
     
  2. Extract the contents from the downloaded (zipped) package, and then copy the lib/wse-plugin-limitstreamviewers.jar file from the package to the lib folder in your Wowza Streaming Engine installation ([install-dir]/lib).
     
  3. Restart Wowza Streaming Engine.

Configuration


To enable this module, add the following module definition to your application configuration. See Configure modules for details.

Name
Description
Fully Qualified Class Name
ModuleLimitStreamViewers Limits viewers per stream. com.wowza.wms.plugin.ModuleLimitStreamViewers

Properties


After enabling the module, you can adjust the default settings by adding the following properties to your application. See Configure properties for details.

Path
Name
Type
Value
Notes
/Root/Application limitStreamViewersMaxViewers Integer 200 Total connections for any stream. (default: 200)
/Root/Application limitStreamViewersByList String myStream=10, myOtherStream=20 Total connections per stream. (default: not set)
/Root/Application limitStreamViewersLogConnectionCounts Boolean true Log connections to stream. (default: true)
/Root/Application limitStreamViewersLogRejections Boolean true Log rejected connections to stream. (default: true)

Usage


The stream won't play for any viewers above the concurrent users limit. What these viewers see varies depending on the behavior of their player.

For developers


  • Get the source code on GitHub