Class SsDownloader

  • All Implemented Interfaces:

    public final class SsDownloader
    extends SegmentDownloader<SsManifest>
    Deprecated. is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    A downloader for SmoothStreaming streams.

    Example usage:

     SimpleCache cache = new SimpleCache(downloadFolder, new NoOpCacheEvictor(), databaseProvider);
     CacheDataSource.Factory cacheDataSourceFactory =
         new CacheDataSource.Factory()
             .setUpstreamDataSourceFactory(new DefaultHttpDataSource.Factory());
     // Create a downloader for the first track of the first stream element.
     SsDownloader ssDownloader =
         new SsDownloader(
             new MediaItem.Builder()
                 .setStreamKeys(Collections.singletonList(new StreamKey(0, 0)))
     // Perform the download.;
     // Use the downloaded data for playback.
     SsMediaSource mediaSource =
         new SsMediaSource.Factory(cacheDataSourceFactory).createMediaSource(mediaItem);