Wednesday 11 January 2023

Which is better for performance CronetDataSource or DefaultHttpDataSource

  No comments


CronetDataSource and DefaultHttpDataSource are both classes in ExoPlayer that provide the functionality for loading media data over the network. However, they use different libraries to handle the network connections.


DefaultHttpDataSource uses the built-in java.net package to handle network connections, while CronetDataSource uses the Cronet library.


Cronet is generally considered to be faster and more efficient than the built-in java.net package, so if performance is a major concern for your use case, CronetDataSource may be a better choice as it uses Cronet library.


It's worth noting that Cronet is a C++ library and it's only available in Android version 7.0 (API level 24) or higher, So if your app is targeting lower android version it will not work.


In summary, if your app is targeting Android 7.0 or higher and performance is a major concern for your use case, you should use the CronetDataSource. If your app is targeting lower Android versions or you don't need the highest level of performance, you can use the DefaultHttpDataSource.c 

No comments :

Post a Comment

Loading...