DownloadRequest.Builder


class DownloadRequest.Builder


A builder for download requests.

Summary

Public constructors

Builder(id: String!, uri: Uri!)

Creates a new instance with the specified id and uri.

Public constructors

Builder

Builder(id: String!, uri: Uri!)

Creates a new instance with the specified id and uri.

Public functions

build

fun build(): DownloadRequest!

setByteRange

@CanIgnoreReturnValue
fun setByteRange(offset: Long, length: Long): DownloadRequest.Builder!

Sets the byte range to be downloaded.

This will be ignored for DASH, HLS and SmoothStreaming downloads.

Parameters
offset: Long

The offset that the download should start from.

length: Long

The length from the offset to be downloaded, or @link C#LENGTH_UNSET} if the media should be downloaded to the end.

setCustomCacheKey

@CanIgnoreReturnValue
fun setCustomCacheKey(customCacheKey: String?): DownloadRequest.Builder!

Sets the customCacheKey.

setKeySetId

@CanIgnoreReturnValue
fun setKeySetId(keySetId: ByteArray?): DownloadRequest.Builder!

Sets the keySetId.

setMimeType

@CanIgnoreReturnValue
fun setMimeType(mimeType: String?): DownloadRequest.Builder!

Sets the mimeType.

setStreamKeys

@CanIgnoreReturnValue
fun setStreamKeys(streamKeys: (Mutable)List<StreamKey!>?): DownloadRequest.Builder!

Sets the streamKeys.