-
Notifications
You must be signed in to change notification settings - Fork 381
Proposal: API for providing HttpDataSource #86
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
I like this idea however it will have to wait until a 3.x version |
You can provide your own |
|
@hzsweers You would need to create your own RenderBuilder and specify a |
Because this isn't a major issue and the ability to specify the DataSource via the RenderBuilders already exists, I'm moving a more simplified solution to a later 3.x release |
I would argue this is a significant issue and specifying via datarenderers isn't simple, but I suppose it's down to the consumer. At the very least, a sample or wiki example would be good to have in the meantime. |
Any updates on this? I would love to be able to set HTTPHeaders for HLS Requests. |
No, It's a low-priority issue as you can specify you own DataSource via the RenderBuilders currently |
Alright, i actually just removed exomedia and used the demo exoPlayer as it was easier to set it that way. |
I'm not sure why that is easier than just specifying your own RenderBuilder but I'm happy it works for you |
Where do you supply your own RenderBuilder? I guess that was a dumb question but during setVideoURI /** |
This functionality has been added to the working // Registers the media sources to use the OkHttp client instead of the standard Apache one
// Note: the OkHttpDataSourceFactory can be found in the ExoPlayer extension library `extension-okhttp`
ExoMedia.setHttpDataSourceFactoryProvider(new ExoMedia.HttpDataSourceFactoryProvider() {
@Override
public HttpDataSource.BaseFactory provide(@NonNull String userAgent, @Nullable TransferListener<? super DataSource> listener) {
return new OkHttpDataSourceFactory(new OkHttpClient(), userAgent, listener);
}
}); |
ExoPlayer allows for providing a custom HttpDataSource. One such use would be providing your own, more up-to-date OkHttpClient instance rather than relying on the older one in the Android framework. It's also useful if you have custom logging in your HttpClient implementation that you'd like to track in the video.
The text was updated successfully, but these errors were encountered: