Commit 04943db7 by ibaker Committed by Christos Tsilopoulos

Don't call `MediaItem.Builder#setKeySetId` without setting the DRM UUID

This is known to silently drop the value. This setter is now deprecated
in favour of `MediaItem.Builder#setDrmConfiguration(MediaItem.DrmConfiguration)`,
which requires a UUID in order to construct the `DrmConfiguration`
instance.

Issue: #9378 tracks correctly propagating the DRM info out of
`DownloadRequest#toMediaItem`.
PiperOrigin-RevId: 397291013
parent 13827186
...@@ -98,7 +98,6 @@ public class DefaultDownloaderFactory implements DownloaderFactory { ...@@ -98,7 +98,6 @@ public class DefaultDownloaderFactory implements DownloaderFactory {
.setUri(request.uri) .setUri(request.uri)
.setStreamKeys(request.streamKeys) .setStreamKeys(request.streamKeys)
.setCustomCacheKey(request.customCacheKey) .setCustomCacheKey(request.customCacheKey)
.setDrmKeySetId(request.keySetId)
.build(); .build();
try { try {
return constructor.newInstance(mediaItem, cacheDataSourceFactory, executor); return constructor.newInstance(mediaItem, cacheDataSourceFactory, executor);
......
...@@ -229,7 +229,6 @@ public final class DownloadRequest implements Parcelable { ...@@ -229,7 +229,6 @@ public final class DownloadRequest implements Parcelable {
.setCustomCacheKey(customCacheKey) .setCustomCacheKey(customCacheKey)
.setMimeType(mimeType) .setMimeType(mimeType)
.setStreamKeys(streamKeys) .setStreamKeys(streamKeys)
.setDrmKeySetId(keySetId)
.build(); .build();
} }
......
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