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_CELLULARNetworkCapabilities.TRANSPORT_WIFINetworkCapabilities.TRANSPORT_ETHERNET
The network transport types can be set with API setNetworkTransportTypes in OTVPlayerConfiguration
// 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);