public final class HlsDownloader extends com.google.android.exoplayer2.offline.SegmentDownloader<HlsMasterPlaylist,java.lang.String>
A subset of renditions can be downloaded by selecting them using SegmentDownloader.selectRepresentations(Object[]). As key, string form of the rendition's url is used. The urls
can be absolute or relative to the master playlist url.
| Constructor and Description |
|---|
HlsDownloader(android.net.Uri manifestUri,
com.google.android.exoplayer2.offline.DownloaderConstructorHelper constructorHelper) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getAllRepresentationKeys() |
protected HlsMasterPlaylist |
getManifest(com.google.android.exoplayer2.upstream.DataSource dataSource,
android.net.Uri uri) |
protected java.util.List<com.google.android.exoplayer2.offline.SegmentDownloader.Segment> |
getSegments(com.google.android.exoplayer2.upstream.DataSource dataSource,
HlsMasterPlaylist manifest,
java.lang.String[] keys,
boolean allowIndexLoadErrors) |
public HlsDownloader(android.net.Uri manifestUri,
com.google.android.exoplayer2.offline.DownloaderConstructorHelper constructorHelper)
SegmentDownloader.SegmentDownloader(Uri, DownloaderConstructorHelper)public java.lang.String[] getAllRepresentationKeys()
throws java.io.IOException
getAllRepresentationKeys in class com.google.android.exoplayer2.offline.SegmentDownloader<HlsMasterPlaylist,java.lang.String>java.io.IOExceptionprotected HlsMasterPlaylist getManifest(com.google.android.exoplayer2.upstream.DataSource dataSource, android.net.Uri uri) throws java.io.IOException
getManifest in class com.google.android.exoplayer2.offline.SegmentDownloader<HlsMasterPlaylist,java.lang.String>java.io.IOExceptionprotected java.util.List<com.google.android.exoplayer2.offline.SegmentDownloader.Segment> getSegments(com.google.android.exoplayer2.upstream.DataSource dataSource,
HlsMasterPlaylist manifest,
java.lang.String[] keys,
boolean allowIndexLoadErrors)
throws java.lang.InterruptedException,
java.io.IOException
getSegments in class com.google.android.exoplayer2.offline.SegmentDownloader<HlsMasterPlaylist,java.lang.String>java.lang.InterruptedExceptionjava.io.IOException