ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Question about a manifest Redirection(301 http status)

Open PavelGP opened this issue 5 years ago • 6 comments

Question: During the playback ExoPlyaer periodically performs manifest requests. So I set a manifest URL "A" to ExoPlyaer and ExoPlyaer makes a request and get a new manifest URL B after the redirection(URL "A" returns URL "B" with 301 http status). And this happens every time when the player is trying to request manifest. Player uses URL "A "and get URL "B" and only then it get a manifest following URL "B". My question is can ExoPlyaer get the URL "B" at the first redirection request and use it during the all playback session?

PavelGP avatar Sep 22 '21 15:09 PavelGP

This is not handled by ExoPlayer but by the network stack used. ExoPlayer can use multiple http libraries, see https://exoplayer.dev/network-stacks.html. I'm not sure if any caches 301. I could not find any such reference in Cronet documentation (which is the most feature complete network stack ExoPlayer supports off the shelf), but maybe you will have more luck?

As this is not really an ExoPlayer question, I'm afraid I can't help you more., but please report your findings!

krocard avatar Sep 29 '21 10:09 krocard

Arguably this is an ExoPlayer question.

For DASH, the DASH-IF IOP suggests that the player should use the redirected URL (B) after an initial redirect, and this was implemented in https://github.com/google/ExoPlayer/pull/7064/files. We have an internal bug [Internal ref: b/124104122] to investigate whether we should do the same for HLS and SmoothStreaming.

@PavelGP - Is your question about DASH, HLS, or something else? If you're asking about DASH, this should already happen due to the change referenced above. If you're asking about HLS, I don't think we ever found anything authoritative that describes what the player is expected to do. Are you aware of any documentation that defines the expected behaviour, or do you know what Apple's implementation does?

ojw28 avatar Oct 01 '21 11:10 ojw28

Hi @ojw28, my question is about DASH streams. Thank you, I tested carefully with a quite old ExoPlayer version which we have in production 2.10.6 and just tried some times version 2.14.2 and I will try to test one more time with the latest version. We use 301 http response status for redirection but in PR https://github.com/google/ExoPlayer/pull/7064/files I can see 302 http status code in title.

PavelGP avatar Oct 07 '21 10:10 PavelGP

but in PR https://github.com/google/ExoPlayer/pull/7064/files I can see 302 http status code in title.

The implementation applies to all redirects. It's not specific to 301. If you think that the manifest redirect isn't being cached for some media that you have, please provide a working link to that media (or a piece of test media that reproduces the issue) and we'll take a look.

ojw28 avatar Oct 07 '21 10:10 ojw28

Hey @PavelGP. We need more information to resolve this issue but there hasn't been an update in 14 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

google-oss-bot avatar Oct 27 '21 01:10 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@PavelGP if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

google-oss-bot avatar Nov 05 '21 01:11 google-oss-bot