diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 535996d0b7..4edc5a5de1 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -11,8 +11,15 @@ * Rename `MediaCodecRenderer.onOutputFormatChanged` to `MediaCodecRenderer.onOutputMediaFormatChanged`, further clarifying the distinction between `Format` and `MediaFormat`. -* Downloads: Merge downloads in `SegmentDownloader` to improve overall download - speed ([#5978](https://github.com/google/ExoPlayer/issues/5978)). +* Downloads: + * Merge downloads in `SegmentDownloader` to improve overall download + speed ([#5978](https://github.com/google/ExoPlayer/issues/5978)). + * Fix handling of network transitions in `RequirementsWatcher` + ([#6733](https://github.com/google/ExoPlayer/issues/6733)). Incorrect + handling could previously cause downloads to be paused when they should have + been able to proceed. + * Fix `DownloadHelper.createMediaSource` to use `customCacheKey` when creating + `ProgressiveMediaSource` instances. * In MP4 streams, store the Android capture frame rate only in `Format.metadata`. `Format.frameRate` now stores the calculated frame rate. * Add `play` and `pause` methods to `Player`. @@ -28,10 +35,6 @@ developers to handle data that's neither UTF-8 nor ISO-8859-1 ([#6753](https://github.com/google/ExoPlayer/issues/6753)). * Add playlist API ([#6161](https://github.com/google/ExoPlayer/issues/6161)). -* Fix handling of network transitions in `RequirementsWatcher` - ([#6733](https://github.com/google/ExoPlayer/issues/6733)). Incorrect handling - could previously cause downloads to be paused when they should have been able - to proceed. * Fix handling of E-AC-3 streams that contain AC-3 syncframes ([#6602](https://github.com/google/ExoPlayer/issues/6602)). * Fix playback of TrueHD streams in Matroska diff --git a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java index 1641b2aef6..02a6ad2cb9 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/offline/DownloadHelper.java @@ -448,6 +448,7 @@ public final class DownloadHelper { break; case DownloadRequest.TYPE_PROGRESSIVE: return new ProgressiveMediaSource.Factory(dataSourceFactory) + .setCustomCacheKey(downloadRequest.customCacheKey) .createMediaSource(downloadRequest.uri); default: throw new IllegalStateException("Unsupported type: " + downloadRequest.type); diff --git a/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java b/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java index f05b576acb..512fbce4a2 100644 --- a/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java +++ b/library/core/src/main/java/com/google/android/exoplayer2/source/ProgressiveMediaSource.java @@ -111,7 +111,7 @@ public final class ProgressiveMediaSource extends BaseMediaSource * @return This factory, for convenience. * @throws IllegalStateException If {@link #createMediaSource(Uri)} has already been called. */ - public Factory setCustomCacheKey(String customCacheKey) { + public Factory setCustomCacheKey(@Nullable String customCacheKey) { Assertions.checkState(!isCreateCalled); this.customCacheKey = customCacheKey; return this;