Skip to content

Commit

Permalink
Enable GZIP for SingleSampleMediaSource
Browse files Browse the repository at this point in the history
Issue: #4771

-------------
Created by MOE: https:/google/moe
MOE_MIGRATED_REVID=212623142
  • Loading branch information
ojw28 committed Sep 12, 2018
1 parent a5a7e98 commit b4dfed8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@
`MediaCodecRenderer`, and provide an (optional) `MediaCodecSelector` that
falls back to less preferred decoders like `MediaCodec.createDecoderByType`
([#273](https:/google/ExoPlayer/issues/273)).
* Enable gzip for requests made by `SingleSampleMediaSource`
([#4771](https:/google/ExoPlayer/issues/4771)).
* Fix bug reporting buffered position for multi-period windows, and add
convenience methods `Player.getTotalBufferedDuration` and
`Player.getContentBufferedDuration`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ private SingleSampleMediaSource(
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);
}
Expand Down

0 comments on commit b4dfed8

Please sign in to comment.