Play an ultra low latency live stream with GoCoder SDK for Android

The technology powering Ultra-Low Latency (ULL) streams will be disabled soon. Learn more about our Real-Time Streaming at Scale solution as a new alternative.

Learn how to add build an app with the Wowza GoCoder™ SDK for Android that can play an ultra low latency live stream from the Wowza Streaming Cloud™ service.


Before you begin

Before adding the functionality below to your app, make sure you've set up the Wowza GoCoder SDK for your project:

  • Request a free license and download the latest version of the SDK.
  • Configure your Android Studio project to use the SDK.

See Download and install GoCoder SDK for Android for detailed instructions.

OS and device support

Playback functionality in the GoCoder SDK is supported on Android 6.0 (level 23) or later. Performance varies across devices.

Set up an ultra low latency stream target in Wowza Streaming Cloud

For Wowza Gocoder playback from the Wowza Streaming Cloud with ultra low latency service, start by setting up an ultra low latency stream target. For instructions, see one of these resources:

Note: If you want to configure the ultra low latency target to enable HLS fallback, you must do so while creating the target. HLS fallback helps ensure successful playback but increases latency.

After you set up the stream target, note the WOWZ Playback URL and the optional HLS fallback URL, as you will use them to set up the WOWZPlayerConfig object.

Add a player view to an app

Use the WOWZPlayerView class to add a player view to an app.

  1. Create a PlayerActivity in your base activity.
  2. In your PlayerActivity layout resource file, add a WOWZPlayerView construct.
    android:layout_centerInParent="true" />
  3. Get a reference to your resource object.
    mStreamPlayerView = (WOWZPlayerView) findViewById(;

Specify the streaming server

Specify the streaming server connection properties for playback.

  1. Use the WOWZPlayerConfig object to specify the connection properties to the streaming server.
    mStreamPlayerConfig = new WOWZPlayerConfig();

    Parse the ultra low latency WOWZ playback URL to get the necessary values. For example, using this WOWZ playback URL,
    The configuration should look something like this:
    mStreamPlayerConfig = new WOWZPlayerConfig();
  2. Pass the WOWZPlayerConfig object with the server information and a callback status object to the WOWZPlayerView class.
    class StatusCallback implements WOWZStatusCallback{
    public void onWZStatus(WOWZStatus wzStatus) {
    public void onWZError(WOWZStatus wzStatus) {

Configure Apple HLS fallback

If you've enabled HLS fallback for your ultra low latency stream, you can instruct the Wowza GoCoder SDK app to play an HLS stream as a fallback if the primary WOWZ over WebSocket stream fails to connect. The player will switch to the HLS URL after three failed attempts to play over the primary WOWZ over WebSocket protocol.

HLS fallback also helps with viewer limits. Ultra low latency streams are subject to a default viewer limit of simultaneous viewers per stream according to the subscription plan you select. If this limit is exceeded, new stream viewers will receive an error and won't be able to establish a connection. If you have enabled and configured HLS as a backup for playback, ultra low latency stream viewers beyond the allotted limit can view the steam via the fallback HLS connection. See Wowza Streaming Cloud REST API limits for more information about limits.

Use the following properties in WowzaPlayerConfig to set up HLS fallback

Property Type Description
setHLSEnabled Boolean Set to true to force the player to use Apple HLS instead of the default playback protocol.
setHLSBackupURL string The .m3u8 playlist URL to use as a fallback.

Update the WOWZPlayerConfig object to add the following:


Play the stream

Use the play() method in the WOWZPlayerView class to play the live stream from the specified server.

WOWZStatusCallback statusCallback = new StatusCallback();, this);

Set optional configurations

  • To enable or disable audio for the stream, use the setAudioEnabled method in the WOWZPlayerConfig class. To enable or disable video, use the setVideoEnabled method in the WOWZPlayerConfig class.

    To enable:


    To disable:

  • To control the volume, use the setVolume method in the WOWZPlayerView class:
  • To configure the scale mode, use the setScaleMode method of the WOWZPlayerView class:
    // WOWZMediaConfig.FILL_VIEW : WOWZMediaConfig.RESIZE_TO_ASPECT;

More resources