CmcdData.Factory


class CmcdData.Factory


CmcdData.Factory for CmcdData instances.

Summary

Public constructors

Factory(
    cmcdConfiguration: CmcdConfiguration!,
    @CmcdData.StreamingFormat streamingFormat: @CmcdData.StreamingFormat String!
)

Creates an instance.

Public functions

CmcdData!

Creates a CmcdData instance.

CmcdData.Factory!

Sets the duration of media currently buffered from the current playback position, in microseconds.

CmcdData.Factory!

Sets the duration of current media chunk being requested, in microseconds.

CmcdData.Factory!

Sets whether a rebuffering event occurred between the previous request and this one.

CmcdData.Factory!

Sets whether the queue of buffered chunks is empty.

CmcdData.Factory!

Sets whether the media content is being streamed live.

CmcdData.Factory!

Sets the relative path of the next object to be requested.

CmcdData.Factory!

Sets the byte range representing the partial object request.

CmcdData.Factory!

Sets the object type of the current object being requested.

CmcdData.Factory!

Sets the playback rate indicating the current speed of playback.

CmcdData.Factory!

Sets the track selection for the media being played.

Public constructors

Factory

Factory(
    cmcdConfiguration: CmcdConfiguration!,
    @CmcdData.StreamingFormat streamingFormat: @CmcdData.StreamingFormat String!
)

Creates an instance.

Parameters
cmcdConfiguration: CmcdConfiguration!

The CmcdConfiguration for this source.

@CmcdData.StreamingFormat streamingFormat: @CmcdData.StreamingFormat String!

The streaming format of the media content.

Public functions

createCmcdData

fun createCmcdData(): CmcdData!

Creates a CmcdData instance.

Throws
java.lang.IllegalStateException

If any required parameters have not been set.

setBufferedDurationUs

@CanIgnoreReturnValue
fun setBufferedDurationUs(bufferedDurationUs: Long): CmcdData.Factory!

Sets the duration of media currently buffered from the current playback position, in microseconds.

Must be set to a non-negative value if the object type is set and one of OBJECT_TYPE_AUDIO_ONLY, OBJECT_TYPE_VIDEO_ONLY or OBJECT_TYPE_MUXED_AUDIO_AND_VIDEO.

Default value is TIME_UNSET.

Throws
java.lang.IllegalArgumentException

If bufferedDurationUs is negative.

setChunkDurationUs

@CanIgnoreReturnValue
fun setChunkDurationUs(chunkDurationUs: Long): CmcdData.Factory!

Sets the duration of current media chunk being requested, in microseconds.

Must be set to a non-negative value if the object type is set and one of OBJECT_TYPE_AUDIO_ONLY, OBJECT_TYPE_VIDEO_ONLY or OBJECT_TYPE_MUXED_AUDIO_AND_VIDEO.

Default value is TIME_UNSET.

Throws
java.lang.IllegalArgumentException

If chunkDurationUs is negative.

setDidRebuffer

@CanIgnoreReturnValue
fun setDidRebuffer(didRebuffer: Boolean): CmcdData.Factory!

Sets whether a rebuffering event occurred between the previous request and this one.

Default value is false.

setIsBufferEmpty

@CanIgnoreReturnValue
fun setIsBufferEmpty(isBufferEmpty: Boolean): CmcdData.Factory!

Sets whether the queue of buffered chunks is empty.

Default value is false.

setIsLive

@CanIgnoreReturnValue
fun setIsLive(isLive: Boolean): CmcdData.Factory!

Sets whether the media content is being streamed live.

Default value is false.

setNextObjectRequest

@CanIgnoreReturnValue
fun setNextObjectRequest(nextObjectRequest: String?): CmcdData.Factory!

Sets the relative path of the next object to be requested. This can be used to trigger pre-fetching by the CDN.

Default is null.

setNextRangeRequest

@CanIgnoreReturnValue
fun setNextRangeRequest(nextRangeRequest: String?): CmcdData.Factory!

Sets the byte range representing the partial object request. This can be used to trigger pre-fetching by the CDN.

Default is null.

setObjectType

@CanIgnoreReturnValue
fun setObjectType(@CmcdData.ObjectType objectType: @CmcdData.ObjectType String?): CmcdData.Factory!

Sets the object type of the current object being requested.

Must be set if track selection is not provided. If unset and a track selection is provided, the object type is derived from it.

Default is null.

setPlaybackRate

@CanIgnoreReturnValue
fun setPlaybackRate(playbackRate: Float): CmcdData.Factory!

Sets the playback rate indicating the current speed of playback.

Default value is RATE_UNSET.

Throws
java.lang.IllegalArgumentException

If playbackRate is non-positive and not RATE_UNSET.

setTrackSelection

@CanIgnoreReturnValue
fun setTrackSelection(trackSelection: ExoTrackSelection!): CmcdData.Factory!

Sets the track selection for the media being played.

Must be set to a non-null value if the setObjectType is not OBJECT_TYPE_MANIFEST

Default is null.