Enable caching for data loaded by ParsingLoadable
This enables caching manifest files for DASH, HLS and SmoothStreaming. To disable caching a non cache DataSource should be provided for reading manifest to the used MediaSource. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=183794252
This commit is contained in:
parent
168a5d63c5
commit
6709dc7f64
@ -72,7 +72,11 @@ public final class ParsingLoadable<T> implements Loadable {
|
||||
* @param parser Parses the object from the response.
|
||||
*/
|
||||
public ParsingLoadable(DataSource dataSource, Uri uri, int type, Parser<? extends T> parser) {
|
||||
this(dataSource, new DataSpec(uri, DataSpec.FLAG_ALLOW_GZIP), type, parser);
|
||||
this(
|
||||
dataSource,
|
||||
new DataSpec(uri, DataSpec.FLAG_ALLOW_GZIP | DataSpec.FLAG_ALLOW_CACHING_UNKNOWN_LENGTH),
|
||||
type,
|
||||
parser);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user