Multi-instance

To test this feature and view the example code, please see the Example Code Quick Setup guide.

The multi-instance feature enables concurrent playback of multiple streams, and is facilitated by having multiple instances of the OpenTV Player.

Concurrent playback is useful for Picture-in-Picture (PiP) capabilities, previews and some other scenarios. 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 devices' hardware decoding and rendering. Some devices' hardware may struggle with decoding and rendering more than one stream, especially when decryption or high bitrates are involved. Performance is therefore not guaranteed.

To facilitate multiple playback:

  • 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 programatically).
  • Each OTVVideoView instance must be configured separately with its own 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).