FORUMS
Remove All Ads from XDA

Stagefright makes multiple HTTP requests for the same audio file.

2 posts
Thanks Meter: 0
 
By DRjansson, Junior Member on 1st June 2016, 03:09 PM
Post Reply Email Thread
I work with a application that produces audio. The way the application works is that a request are done to a server where the request is handled and then a redirect is done to point to where the audio can be found (and then streamed back to the (often browser) where the initial request came from).
Many users are browsing the web through mobiles these days and lately I've discovered that there's some issues with Android's audio playback in their browsers and I'm thinking it can be Stagefright that are the "bad" component, or that I don't supply Stagefright with the correct information which makes it behave bad.

Why I believe Stagefright is behaving bad is because one of the user-agents used are "stagefright/1.2 (Linux;Android 4.4.2)" and seen in the access logs of the servers, on to the problem:
It makes between 1 (which is what I expect) up to a couple of hundreds of requests for the same audio file.
When I connect a android device through a proxy server to see the requests made from the device, I can confirm this behavior and determine a pattern on how the device is making the requests.
The requests is done in the following pattern:
Request 1: trying to determine where the audio file can be found. (Normal)
Request 2: fetching the audio file, which is pointed out by the redirect. (This request is successful, the whole audio file is transferred (at least through the proxy) to the device).

If this is done once, everything works as expected, but when the pattern repeats a number of times (1- hundreds) it causes the audio file to load very slowly. I have no idea why this occurs, I have tested to give different headers and http status codes back in the answer that contains the location header (the redirect) without success.

I have tried to look at the source code for where Stagefright are fetching the audio file, but I have not found the correct place.


Basically, I'm looking for a way to make Stagefright (android in general) happy with the first response I'm giving it so it doesn't have to fetch the same audio file 2 or more times in a row.
 
 
27th October 2016, 10:28 AM |#2  
OP Junior Member
Thanks Meter: 0
 
More
Have anyone else seen this issue or are suffering from it at the moment?
I would very much like to speak to someone about this issue.

Best regards, David
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes