-
Notifications
You must be signed in to change notification settings - Fork 381
Redirections (302) #581
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
Comments
You can specify a DataSourceProvider with |
@brianwernick I am only using AudioPlayer class |
That doesn't matter, the |
Can you write the code here how to do that? |
See #86 |
@brianwernick How to handle cross origin and protocol redirects here? |
You need to provide a If you are using OkHttp then you can use OkHttpClient httpClient = new OkHttpClient().newBuilder().followRedirects(true).followSslRedirects(true).build();
return new OkHttpDataSourceFactory(httpClient, userAgent, listener); or if you want to use the default client then // The last argument `true` is what indicates that we allow cross origin redirects
return new DefaultHttpDataSourceFactory(userAgent, listener, DefaultHttpDataSource.DEFAULT_CONNECT_TIMEOUT_MILLIS, DefaultHttpDataSource.DEFAULT_READ_TIMEOUT_MILLIS, true); |
@brianwernick Thanks a lot!! it worked!! |
I am experiencing exactly same issue with google/ExoPlayer#1190
but I am not sure how to pass allowCrossProtocolRedirects=true to the DefaultUriDataSource constructor.
Can you help?
The text was updated successfully, but these errors were encountered: