Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving the redirection URL from outside the Exo lib #11224

Open
Xlcghs opened this issue Jun 23, 2023 · 1 comment
Open

Retrieving the redirection URL from outside the Exo lib #11224

Xlcghs opened this issue Jun 23, 2023 · 1 comment
Assignees
Labels

Comments

@Xlcghs
Copy link

Xlcghs commented Jun 23, 2023

Hello,

Is it possible to intercept the redirection url of a mediaSource following an HTTP 307 response from outside Exo without customizing the HttpDataSource class?

@marcbaechinger
Copy link
Contributor

marcbaechinger commented Jun 23, 2023

Is it possible to intercept the redirection url of a mediaSource following an HTTP 307 response from outside Exo

I'm not sure I understand what you mean with outside Exo.

If you mean intercept as in stopping such request then probably no. If intercept just means having access to it, then you can learn about the loaded data by listening to appropriate events the player emits.

AnalyticsListener has methods like onLoadStarted(EventTime eventTime, LoadEventInfo loadEventInfo, MediaLoadData mediaLoadData) and onLoadCompleted/onLoadCancelled. All of these report a LoadEventInfo. The JavaDoc of LoadEventInfo.uri says:

/**
   * The {@link Uri} from which data is being read. The uri will be identical to the one in {@link
   * #dataSpec}.uri unless redirection has occurred. If redirection has occurred, this is the uri
   * after redirection.
   */

If this does not help, then you need to give some more info around what you are trying to achieve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants