Class DownloadRequest

  • All Implemented Interfaces:
    Parcelable

    @Deprecated
    public final class DownloadRequest
    extends Object
    implements Parcelable
    Deprecated.
    com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
    Defines content to be downloaded.
    • Field Detail

      • id

        public final String id
        Deprecated.
        The unique content id.
      • uri

        public final Uri uri
        Deprecated.
        The uri being downloaded.
      • mimeType

        @Nullable
        public final String mimeType
        Deprecated.
        The MIME type of this content. Used as a hint to infer the content's type (DASH, HLS, SmoothStreaming). If null, a DownloadService will infer the content type from the uri.
      • streamKeys

        public final List<StreamKey> streamKeys
        Deprecated.
        Stream keys to be downloaded. If empty, all streams will be downloaded.
      • keySetId

        @Nullable
        public final byte[] keySetId
        Deprecated.
        The key set id of the offline licence if the content is protected with DRM.
      • customCacheKey

        @Nullable
        public final String customCacheKey
        Deprecated.
        Custom key for cache indexing, or null. Must be null for DASH, HLS and SmoothStreaming downloads.
      • data

        public final byte[] data
        Deprecated.
        Application defined data associated with the download. May be empty.
    • Method Detail

      • copyWithId

        public DownloadRequest copyWithId​(String id)
        Deprecated.
        Returns a copy with the specified ID.
        Parameters:
        id - The ID of the copy.
        Returns:
        The copy with the specified ID.
      • copyWithKeySetId

        public DownloadRequest copyWithKeySetId​(@Nullable
                                                byte[] keySetId)
        Deprecated.
        Returns a copy with the specified key set ID.
        Parameters:
        keySetId - The key set ID of the copy.
        Returns:
        The copy with the specified key set ID.
      • copyWithMergedRequest

        public DownloadRequest copyWithMergedRequest​(DownloadRequest newRequest)
        Deprecated.
        Returns the result of merging newRequest into this request. The requests must have the same id.

        The resulting request contains the stream keys from both requests. For all other member variables, those in newRequest are preferred.

        Parameters:
        newRequest - The request being merged.
        Returns:
        The merged result.
        Throws:
        IllegalArgumentException - If the requests do not have the same id.
      • toMediaItem

        public MediaItem toMediaItem()
        Deprecated.
        Returns a MediaItem for the content defined by the request.
      • equals

        public boolean equals​(@Nullable
                              Object o)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public final int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object