CONNECT Player SDK 5 for Android

Setting network transport types for monitoring

Connect Player can monitor network transport and reset player to continue playback when network recovers. By default, the following 3 network transport types will be monitored:

  • NetworkCapabilities.TRANSPORT_CELLULAR

  • NetworkCapabilities.TRANSPORT_WIFI

  • NetworkCapabilities.TRANSPORT_ETHERNET

The network transport types can be set with API setNetworkTransportTypes in OTVPlayerConfiguration

Java
// Define the network transport types for monitoring
ArrayList<Integer> networkTransportTypes = new ArrayList<>();
networkTransportTypes.add(NetworkCapabilities.TRANSPORT_CELLULAR);
networkTransportTypes.add(NetworkCapabilities.TRANSPORT_WIFI);

// Create configuration with builder
OTVPlayerConfiguration configuration =
  new OTVPlayerConfiguration.Builder()
    .setNetworkTransportTypes(networkTransportTypes) // Set transport types
    .build();  //Build the player configuration
// Here videoView is the instance of OTVVideoView.
videoView.setPlayerConfiguration(configuration);