mirror of
https://github.com/samsonjs/media.git
synced 2026-03-29 10:05:48 +00:00
Use customCacheKey in DownloadHelper.createMediaSource
Issue: #6870 PiperOrigin-RevId: 289658261
This commit is contained in:
parent
32021602ca
commit
771aa32825
2 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue