class SsDownloader.Factory : SegmentDownloader.BaseFactory


A factory for SmoothStreaming downloaders.

Summary

Public constructors

Factory(cacheDataSourceFactory: CacheDataSource.Factory!)

Creates a factory for SsDownloader.

Public functions

SsDownloader!
create(mediaItem: MediaItem!)

Creates SmoothStreaming downloaders.

SsDownloader.Factory!

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

abstract SegmentDownloaderFactory!
setDurationUs(durationUs: Long)

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

SsDownloader.Factory!

Sets the Executor used to make requests for the media being downloaded.

abstract SegmentDownloaderFactory!
setExecutor(executor: Executor!)

Sets the Executor used to make requests for the media being downloaded.

SsDownloader.Factory!

Sets a parser for SmoothStreaming manifests.

SsDownloader.Factory!
@CanIgnoreReturnValue
setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
)

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

abstract SegmentDownloaderFactory!
setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
)

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

SsDownloader.Factory!

Sets the start position in microseconds that the download should start from.

abstract SegmentDownloaderFactory!
setStartPositionUs(startPositionUs: Long)

Sets the start position in microseconds that the download should start from.

Public constructors

Factory

Factory(cacheDataSourceFactory: CacheDataSource.Factory!)

Creates a factory for SsDownloader.

Parameters
cacheDataSourceFactory: CacheDataSource.Factory!

A CacheDataSource.Factory for the cache into which the download will be written.

Public functions

create

fun create(mediaItem: MediaItem!): SsDownloader!

Creates SmoothStreaming downloaders.

setDurationUs

@CanIgnoreReturnValue
fun setDurationUs(durationUs: Long): SsDownloader.Factory!

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

Returns
SsDownloader.Factory!

This factory, for convenience.

setDurationUs

abstract fun setDurationUs(durationUs: Long): SegmentDownloaderFactory!

Sets the duration in microseconds from the startPositionUs to be downloaded, or TIME_UNSET if the media should be downloaded to the end.

setExecutor

@CanIgnoreReturnValue
fun setExecutor(executor: Executor!): SsDownloader.Factory!

Sets the Executor used to make requests for the media being downloaded. Providing an Executor that uses multiple threads will speed up the download by allowing parts of it to be executed in parallel.

Returns
SsDownloader.Factory!

This factory, for convenience.

setExecutor

abstract fun setExecutor(executor: Executor!): SegmentDownloaderFactory!

Sets the Executor used to make requests for the media being downloaded. Providing an Executor that uses multiple threads will speed up the download by allowing parts of it to be executed in parallel.

setManifestParser

@CanIgnoreReturnValue
fun setManifestParser(manifestParser: SsManifestParser!): SsDownloader.Factory!

Sets a parser for SmoothStreaming manifests.

Returns
SsDownloader.Factory!

This factory, for convenience.

setMaxMergedSegmentStartTimeDiffMs

@CanIgnoreReturnValue
fun setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
): SsDownloader.Factory!

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

Returns
SsDownloader.Factory!

This factory, for convenience.

setMaxMergedSegmentStartTimeDiffMs

abstract fun setMaxMergedSegmentStartTimeDiffMs(
    maxMergedSegmentStartTimeDiffMs: Long
): SegmentDownloaderFactory!

Sets the maximum difference of the start time of two segments, up to which the segments (of the same URI) should be merged into a single download segment, in milliseconds.

setStartPositionUs

@CanIgnoreReturnValue
fun setStartPositionUs(startPositionUs: Long): SsDownloader.Factory!

Sets the start position in microseconds that the download should start from.

Returns
SsDownloader.Factory!

This factory, for convenience.

setStartPositionUs

abstract fun setStartPositionUs(startPositionUs: Long): SegmentDownloaderFactory!

Sets the start position in microseconds that the download should start from.