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

The multi-instance feature enables concurrent playback of multiple streams for Picture-in-Picture (PiP) capabilities, previews and other scenarios.
It is facilitated by having multiple instances of the CONNECT Player; to play more than one stream at the same time, a player must be created for each of the playing streams.

The SDK depends on the device hardware decoding and rendering. Performance is not guaranteed as some devices may struggle when playing more than one stream, especially when decryption or high bitrates are involved.

To facilitate multiple playbacks:

  • You must define screen real-estate for each player and associate each with its OTVVideoView instance; in the activity’s layout file, a nagra.otv.sdk.OTVVideoView entry has to be created for each player (unless created programmatically).
  • Each OTVVideoView instance must be configured separately with its stream definitions, player, callbacks, listeners and controls.
  • The event handlers (e.g. onStart(), onPause(), onResume()) have to handle all OTVVideoView instances.
  • Each player instance is controlled separately. If, for example, a second player is set up for PiP, it is the application’s responsibility to mute the second player’s audio (setting its volume to 0).