What factors affect the speed of exoplayer loading online videos?
In my app,i used exoplayer to load online video? but loading speed is very slow. In other app , the same online video is faster then mine.
I create a class extends DefaultHttpDataSource, and log speed of read . In my app , read length is small , only 200 to 300 . In other app , read length will be 1000 to 20000 .
↓this is log of other app
↓this is log of my app
And my app often stops reading data even though video is not prepared.
What can I do to improve this situation?
If I'm understanding your test/comparison set-up correctly:
- You have two apps, "yours" and "other"
- Both are using ExoPlayer with
DefaultHttpDataSource - You added logging via subclassing
DefaultHttpDataSourcein both apps- It's unclear from your comment exactly what values you are logging.
- You saw different values logged from each app as shown in your screenshots.
Since you have access to the source code of both apps, you are best placed to determine what the differences between the way they configure ExoPlayer and DefaultHttpDataSource are. It's somewhat difficult for us to offer any commentary on this experiment with the level of detail provided.
Closing due to inactivity.