mirror of
https://github.com/samsonjs/media.git
synced 2026-03-31 10:25:48 +00:00
Enable GZIP for SingleSampleMediaSource
Issue: #4771 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=212623142
This commit is contained in:
parent
a5a7e988e3
commit
b4dfed874d
2 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue