Commit b4b049c5 by ibaker Committed by Ian Baker

Remove unneeded HttpDataSource references from the dev guide

Where the DataSource interface offers enough functionality, we can just
reference that.

PiperOrigin-RevId: 436521221
parent cfb8289c
Showing with 8 additions and 7 deletions
...@@ -49,12 +49,13 @@ case. The following example shows how to customize the player to use Android's ...@@ -49,12 +49,13 @@ case. The following example shows how to customize the player to use Android's
default network stack with cross-protocol redirects enabled: default network stack with cross-protocol redirects enabled:
~~~ ~~~
// Build a HttpDataSource.Factory with cross-protocol redirects enabled. // Build a DefaultHttpDataSource.Factory with cross-protocol redirects enabled.
HttpDataSource.Factory httpDataSourceFactory = DataSource.Factory httpDataSourceFactory =
new DefaultHttpDataSource.Factory().setAllowCrossProtocolRedirects(true); new DefaultHttpDataSource.Factory().setAllowCrossProtocolRedirects(true);
// Wrap the HttpDataSource.Factory in a DefaultDataSource.Factory, which adds in // Wrap the DefaultHttpDataSource.Factory in a DefaultDataSource.Factory, which
// support for requesting data from other sources (e.g., files, resources, etc). // adds in support for requesting data from other sources (e.g., files,
// resources, etc).
DefaultDataSource.Factory dataSourceFactory = DefaultDataSource.Factory dataSourceFactory =
new DefaultDataSource.Factory(context, httpDataSourceFactory); new DefaultDataSource.Factory(context, httpDataSourceFactory);
...@@ -66,9 +67,9 @@ ExoPlayer player = ...@@ -66,9 +67,9 @@ ExoPlayer player =
~~~ ~~~
{: .language-java} {: .language-java}
The same approach can be used to configure and inject `HttpDataSource.Factory` The same approach can be used to configure and inject HTTP-based
implementations provided by the [Cronet extension] and the [OkHttp extension], `DataSource.Factory` implementations provided by the [Cronet extension] and the
depending on your preferred choice of network stack. [OkHttp extension], depending on your preferred choice of network stack.
### Caching data loaded from the network ### ### Caching data loaded from the network ###
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment