Skip to main content
Skip table of contents

Tunnelled video playback

To test this feature and view the example code, please see the Android SDK 5 Example Code Quick Start guide.

Playback performance can be maximised using tunnelled mode, where devices' decoders tunnel video decoding and rendering.

For example, most modern Android devices (OS 5 and higher) hardware decoders support playback of 4K @60FPS. To play a video at such a high resolution and frame rate, the media pipeline requires very aggressive timing; due to thread and process scheduling limitations of the kernel, the player may not be able to render 4K frames at 16 msec intervals, which may result in frame drops. Tunnelled mode may be used to improve this situation.

There are various limitations to tunnelled mode playback:

  • Hardware limitations - covering only a subset of video codecs.

  • Stream limitations - for example, must have both audio and video, not supporting VR or 360⁰.

  • Software limitations - can only output to a SurfaceView

As tunnelled mode is not universally applicable, the CONNECT Player SDK disables this option by default. However, through configuration, the application can specify to enable Tunnelled mode. If the device does not support this mode, the CONNECT player will silently ignore this setting and revert to normal playback mode.

Example code

The Java source code in the tunneled-playback example code demonstrates how to use the OTVPlayerConfiguration builder to enable tunnelling.

JAVA
// Create new player configuration to enable tunnelled playback if possible.
OTVPlayerConfiguration playerConfiguration =
        new OTVPlayerConfiguration.Builder()
            .setTunnelingEnabled(true)
            /* Set any other non-default configuration here */
            .build();
// Set new player configuration to OTVVideoView object before playback.
mOTVVideoView.setPlayerConfiguration(playerConfiguration);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.