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 simultaneous 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 simultaneously, a player must be created for each stream.
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 space for each player and associate each with its
OTVVideoViewinstance; in the activity’s layout file, a
nagra.otv.sdk.OTVVideoViewentry must be created for each player (unless created programmatically).
OTVVideoViewinstance must be configured separately with its stream definitions, player, callbacks, listeners and controls.
- The event handlers (e.g.
onResume()) have to handle all
- 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).