Commit b4dfed87 by olly Committed by Oliver Woodman

Enable GZIP for SingleSampleMediaSource

Issue: #4771

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=212623142
parent a5a7e988
......@@ -113,6 +113,8 @@
`MediaCodecRenderer`, and provide an (optional) `MediaCodecSelector` that
falls back to less preferred decoders like `MediaCodec.createDecoderByType`
([#273](https://github.com/google/ExoPlayer/issues/273)).
* Enable gzip for requests made by `SingleSampleMediaSource`
([#4771](https://github.com/google/ExoPlayer/issues/4771)).
* Fix bug reporting buffered position for multi-period windows, and add
convenience methods `Player.getTotalBufferedDuration` and
`Player.getContentBufferedDuration`
......
......@@ -287,7 +287,8 @@ public final class SingleSampleMediaSource extends BaseMediaSource {
this.durationUs = durationUs;
this.loadErrorHandlingPolicy = loadErrorHandlingPolicy;
this.treatLoadErrorsAsEndOfStream = treatLoadErrorsAsEndOfStream;
dataSpec = new DataSpec(uri);
dataSpec =
new DataSpec(uri, DataSpec.FLAG_ALLOW_GZIP | DataSpec.FLAG_ALLOW_CACHING_UNKNOWN_LENGTH);
timeline =
new SinglePeriodTimeline(durationUs, /* isSeekable= */ true, /* isDynamic= */ false, tag);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment