-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Description
When the ExoPlayer is used to play certain audio files by streaming them from the network, the ExoPlayer makes 2 attempts to retrieve the file at varying byte offsets before commencing playback.
Steps to reproduce the problem from the demo application:
- Install the demo application
- Select Google Play (MP3 Audio)
Details
One execution of the example above, connected over wifi on a Nexus 6P, produced the following network requests:
GET /exoplayer-test-media-0/play.mp3 HTTP/1.1
User-Agent ExoPlayerDemo/1.5.2 (Linux;Android 6.0.1) ExoPlayerLib/1.5.2
Accept-Encoding identity
Host storage.googleapis.com
Connection Keep-Alive
GET /exoplayer-test-media-0/play.mp3 HTTP/1.1
Range bytes=313-
User-Agent ExoPlayerDemo/1.5.2 (Linux;Android 6.0.1) ExoPlayerLib/1.5.2
Accept-Encoding identity
Host storage.googleapis.com
Connection Keep-Alive
Expected behaviour
Only a single network request is made by the ExoPlayer.
Notes
We encounter this problem with AAC/MP4 files as well.
When we test this file (/exoplayer-test-media-0/play.mp3) with the Android MediaPlayer, it loads in one request.
GET /exoplayer-test-media-0/play.mp3 HTTP/1.1
User-Agent stagefright/1.2 (Linux;Android 5.0.2)
Host storage.googleapis.com
Connection Keep-Alive
Accept-Encoding gzip