Skip to content

Stream request results in multiple requests #1041

@juliusspencer

Description

@juliusspencer

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:

  1. Install the demo application
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions