mirror of
https://github.com/samsonjs/media.git
synced 2026-04-09 11:55:46 +00:00
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
1 changed files with 5 additions and 1 deletions
|
|
@ -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…
Reference in a new issue