Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

DataSourceDesc2.Builder

public static abstract class DataSourceDesc2.Builder
extends Object

java.lang.Object
   ↳ androidx.media2.DataSourceDesc2.Builder<T extends androidx.media2.DataSourceDesc2.Builder>


Builder class for DataSourceDesc2 objects.

Summary

Public methods

T setEndPosition(long position)

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

T setMediaId(String mediaId)

Sets the media Id of this data source.

T setStartPosition(long position)

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

Inherited methods

Public methods

setEndPosition

public T setEndPosition (long position)

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

Parameters
position long: the end position in milliseconds at which the playback will end

Returns
T the same Builder instance.

setMediaId

public T setMediaId (String mediaId)

Sets the media Id of this data source.

Parameters
mediaId String: the media Id of this data source

Returns
T the same Builder instance.

setStartPosition

public T setStartPosition (long position)

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
T the same Builder instance.