From b4b049c59392f2b6195e55f3c596006cb39c1956 Mon Sep 17 00:00:00 2001 From: ibaker Date: Tue, 22 Mar 2022 18:12:37 +0000 Subject: [PATCH] Remove unneeded HttpDataSource references from the dev guide Where the DataSource interface offers enough functionality, we can just reference that. PiperOrigin-RevId: 436521221 --- docs/customization.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index ffe455a91f..0023682862 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -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: ~~~ -// Build a HttpDataSource.Factory with cross-protocol redirects enabled. -HttpDataSource.Factory httpDataSourceFactory = +// Build a DefaultHttpDataSource.Factory with cross-protocol redirects enabled. +DataSource.Factory httpDataSourceFactory = new DefaultHttpDataSource.Factory().setAllowCrossProtocolRedirects(true); -// Wrap the HttpDataSource.Factory in a DefaultDataSource.Factory, which adds in -// support for requesting data from other sources (e.g., files, resources, etc). +// Wrap the DefaultHttpDataSource.Factory in a DefaultDataSource.Factory, which +// adds in support for requesting data from other sources (e.g., files, +// resources, etc). DefaultDataSource.Factory dataSourceFactory = new DefaultDataSource.Factory(context, httpDataSourceFactory); @@ -66,9 +67,9 @@ ExoPlayer player = ~~~ {: .language-java} -The same approach can be used to configure and inject `HttpDataSource.Factory` -implementations provided by the [Cronet extension] and the [OkHttp extension], -depending on your preferred choice of network stack. +The same approach can be used to configure and inject HTTP-based +`DataSource.Factory` implementations provided by the [Cronet extension] and the +[OkHttp extension], depending on your preferred choice of network stack. ### Caching data loaded from the network ###