CallbackMediaItem.Builder

Added in 1.0.0
Deprecated in 1.3.0

class CallbackMediaItem.Builder : MediaItem.Builder


This Builder class simplifies the creation of a CallbackMediaItem object.

Summary

Public constructors

Creates a new Builder object.

Public functions

CallbackMediaItem
CallbackMediaItem.Builder
setEndPosition(position: Long)

Sets the end position in milliseconds at which the playback will end.

CallbackMediaItem.Builder

Set the metadata of this instance.

CallbackMediaItem.Builder

Sets the start position in milliseconds at which the playback will start.

Public constructors

Builder

Added in 1.0.0
Deprecated in 1.3.0
Builder(dsc2: DataSourceCallback)

Creates a new Builder object.

Parameters
dsc2: DataSourceCallback

the DataSourceCallback for the media you want to play

Public functions

build

Added in 1.3.0
Deprecated in 1.3.0
fun build(): CallbackMediaItem
Returns
CallbackMediaItem

A new CallbackMediaItem with values supplied by the Builder.

setEndPosition

Added in 1.3.0
Deprecated in 1.3.0
fun setEndPosition(position: Long): CallbackMediaItem.Builder

Sets the end position in milliseconds at which the playback will end. Any negative number is treated as maximum length of the media item.

Parameters
position: Long

the end position in milliseconds at which the playback will end

Returns
CallbackMediaItem.Builder

this instance for chaining

setMetadata

Added in 1.3.0
Deprecated in 1.3.0
fun setMetadata(metadata: MediaMetadata?): CallbackMediaItem.Builder

Set the metadata of this instance. null for unset.

Parameters
metadata: MediaMetadata?

metadata

Returns
CallbackMediaItem.Builder

this instance for chaining

setStartPosition

Added in 1.3.0
Deprecated in 1.3.0
fun setStartPosition(position: Long): CallbackMediaItem.Builder

Sets the start position in milliseconds at which the playback will start. Any negative number is treated as 0.

Parameters
position: Long

the start position in milliseconds at which the playback will start

Returns
CallbackMediaItem.Builder

this instance for chaining