mirror of
https://github.com/samsonjs/media.git
synced 2026-04-08 11:45:51 +00:00
Update dev guide to use non-deprecated factory
#minor-release PiperOrigin-RevId: 386966219
This commit is contained in:
parent
cdf26a01cf
commit
9e615ce5f3
5 changed files with 5 additions and 5 deletions
|
|
@ -39,7 +39,7 @@ directly to the player instead of a `MediaItem`.
|
|||
|
||||
~~~
|
||||
// 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.
|
||||
MediaSource mediaSource =
|
||||
new DashMediaSource.Factory(dataSourceFactory)
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ downloadCache = new SimpleCache(
|
|||
databaseProvider);
|
||||
|
||||
// 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
|
||||
// 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`.
|
|||
|
||||
~~~
|
||||
// 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.
|
||||
HlsMediaSource hlsMediaSource =
|
||||
new HlsMediaSource.Factory(dataSourceFactory)
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ directly to the player instead of a `MediaItem`.
|
|||
|
||||
~~~
|
||||
// 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.
|
||||
MediaSource mediaSource = new ProgressiveMediaSource.Factory(dataSourceFactory)
|
||||
.createMediaSource(MediaItem.fromUri(progressiveUri));
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ directly to the player instead of a `MediaItem`.
|
|||
|
||||
~~~
|
||||
// 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.
|
||||
MediaSource mediaSource =
|
||||
new SsMediaSource.Factory(dataSourceFactory)
|
||||
|
|
|
|||
Loading…
Reference in a new issue