Commit 9e615ce5 by olly Committed by bachinger

Update dev guide to use non-deprecated factory

#minor-release

PiperOrigin-RevId: 386966219
parent cdf26a01
...@@ -39,7 +39,7 @@ directly to the player instead of a `MediaItem`. ...@@ -39,7 +39,7 @@ directly to the player instead of a `MediaItem`.
~~~ ~~~
// Create a data source factory. // Create a data source factory.
DataSource.Factory dataSourceFactory = new DefaultHttpDataSourceFactory(); DataSource.Factory dataSourceFactory = new DefaultHttpDataSource.Factory();
// Create a DASH media source pointing to a DASH manifest uri. // Create a DASH media source pointing to a DASH manifest uri.
MediaSource mediaSource = MediaSource mediaSource =
new DashMediaSource.Factory(dataSourceFactory) new DashMediaSource.Factory(dataSourceFactory)
......
...@@ -72,7 +72,7 @@ downloadCache = new SimpleCache( ...@@ -72,7 +72,7 @@ downloadCache = new SimpleCache(
databaseProvider); databaseProvider);
// Create a factory for reading the data from the network. // Create a factory for reading the data from the network.
dataSourceFactory = new DefaultHttpDataSourceFactory(); dataSourceFactory = new DefaultHttpDataSource.Factory();
// Choose an executor for downloading data. Using Runnable::run will cause each download task to // Choose an executor for downloading data. Using Runnable::run will cause each download task to
// download data on its own thread. Passing an executor that uses multiple threads will speed up // download data on its own thread. Passing an executor that uses multiple threads will speed up
......
...@@ -42,7 +42,7 @@ directly to the player instead of a `MediaItem`. ...@@ -42,7 +42,7 @@ directly to the player instead of a `MediaItem`.
~~~ ~~~
// Create a data source factory. // Create a data source factory.
DataSource.Factory dataSourceFactory = new DefaultHttpDataSourceFactory(); DataSource.Factory dataSourceFactory = new DefaultHttpDataSource.Factory();
// Create a HLS media source pointing to a playlist uri. // Create a HLS media source pointing to a playlist uri.
HlsMediaSource hlsMediaSource = HlsMediaSource hlsMediaSource =
new HlsMediaSource.Factory(dataSourceFactory) new HlsMediaSource.Factory(dataSourceFactory)
......
...@@ -26,7 +26,7 @@ directly to the player instead of a `MediaItem`. ...@@ -26,7 +26,7 @@ directly to the player instead of a `MediaItem`.
~~~ ~~~
// Create a data source factory. // Create a data source factory.
DataSource.Factory dataSourceFactory = new DefaultHttpDataSourceFactory(); DataSource.Factory dataSourceFactory = new DefaultHttpDataSource.Factory();
// Create a progressive media source pointing to a stream uri. // Create a progressive media source pointing to a stream uri.
MediaSource mediaSource = new ProgressiveMediaSource.Factory(dataSourceFactory) MediaSource mediaSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
.createMediaSource(MediaItem.fromUri(progressiveUri)); .createMediaSource(MediaItem.fromUri(progressiveUri));
......
...@@ -41,7 +41,7 @@ directly to the player instead of a `MediaItem`. ...@@ -41,7 +41,7 @@ directly to the player instead of a `MediaItem`.
~~~ ~~~
// Create a data source factory. // Create a data source factory.
DataSource.Factory dataSourceFactory = new DefaultHttpDataSourceFactory(); DataSource.Factory dataSourceFactory = new DefaultHttpDataSource.Factory();
// Create a SmoothStreaming media source pointing to a manifest uri. // Create a SmoothStreaming media source pointing to a manifest uri.
MediaSource mediaSource = MediaSource mediaSource =
new SsMediaSource.Factory(dataSourceFactory) new SsMediaSource.Factory(dataSourceFactory)
......
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