Skip to main content
Skip table of contents

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);

JavaScript errors detected

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

If this problem persists, please contact our support.